Added second parameter in onSelect event.