Repository navigation
Release v2.14.0
v2.14.0
Changelog
Multi-select filter field (Tom Select chips, progressive enhancement) for listings; the folded filter summary counts multiple choices.
Added
- Multi-select filter field (upstream note U-007-2 from core-nowo-v2): a
ChoiceTypewithmultiple: true
shown as chips with a remove button and a search inside the control, keyboard accessible, as core-nowo's
autocomplete multi-selects (policy status, policy type). Progressive: without JavaScript the native
<select multiple>stays and submits the same GET query (status[]=…).- ChoiceType option
nowo_ui_multi_select(Nowo\UiKitBundle\Form\MultiSelectTypeExtension, registered when
symfony/form is installed; EntityType / EnumType inherit it):trueor{controller, options, labels, dropdown_parent}; writes the classnowo-ui-multi-select,data-controllerand the peer's values with the new
multi_select.remove/multi_select.no_resultstranslations (every shipped locale). Expanded choices are
left alone. - Stimulus peer
multi-select(stimulus-peers/multi_select_controller.ts): Tom Select imported on demand
(tom-select^2.3 as an optional peer dependency, checked against 2.6.2),remove_button, the select's own
classes kept off the wrapper, the dropdown attached to<body>(not clipped by a card withoverflow: hidden;
inline inside a<dialog>), destroy on disconnect keeping the chosen values; eventsmulti-select:ready/
multi-select:unavailable. - Standalone skin
css/nowo-ui-multi-select.css(no Tom Select stylesheet needed): input height when collapsed
(filter-bar control height), wrapping chips, kit tokens for light / dark, focus ring, invalid state, reduced
motion;nowo-ui.csskeeps the native fallback of a filter multi-select to about four rows.
See USAGE and STIMULUS.
- ChoiceType option
Fixed
filters_collapse: the server-side active filter count (filter_form) now counts a multiple choice, as the
filters-collapsepeer does: a multi-select once when anything is chosen, a checkbox list once per checked box
(arrays were ignored, so a folded card read "No active filters" with chosen statuses).