@onClickOutside was an early attempt at creating an action that could be used to close a select box when it was no longer being interacted with.
A better paradigm is to use focus events - this allows us to remove document event handlers - which were previously being used for monitoring clicks outside of select boxes.
The migration from @onClickOutside to @onFocusLeave retains the same behaviour as before, but has the added benefit that @onFocusLeave will also fire when tabbing to an element outside of the select box.
@onClickOutside
was an early attempt at creating an action that could be used to close a select box when it was no longer being interacted with.A better paradigm is to use focus events - this allows us to remove document event handlers - which were previously being used for monitoring clicks outside of select boxes.
The migration from
@onClickOutside
to@onFocusLeave
retains the same behaviour as before, but has the added benefit that@onFocusLeave
will also fire when tabbing to an element outside of the select box.