Recommend moving the `if (inSelectMode && !e.dataset.selectRendered)` conditional into `renderSelectCheck()`.  The function call is very cheap and it makes the code a lot cleaner to only define the check in one place.