Added onSelect event.