Associates select function with isStateEqual and isSelectionEqual to improve selection performance.
Determines if selected state has changed.
Determines if selected state should be recalculated.
Calculates selected state