Selecting/Unselecting Options
Selecting/Unselecting options functionality is implemented in the Trio store and used by two different components: the Tagger and the Filter.
Clicking an option in the filter component will toggle its value; that is, add or remove it from the filterSelected array and visually change its selection status in the filter form.
The option.click() behavior in the Tagger is more complex and depends on the option's status and the type of group it belongs to (for example, click on a different option from a required/single group must select the new option and unselect the old).
For both Filter and Tagger, unselecting an option unselects dependent groups and options recursively.
The implementation of this behavior can be found here - start with optionClicked().