feat(LIB-1918): FzTypeahead#272
Conversation
ac46461 to
8e3ed9e
Compare
8e3ed9e to
648df31
Compare
648df31 to
106fe5a
Compare
| (option): option is FzTypeaheadOptionProps => | ||
| isSelectableOption(option) && option.value === model.value | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Bug: Selected option shows placeholder after filtering without selecting
The selectedOption computed property searches for the model value in internalFilteredOptions rather than props.options. When a user has a value selected, types to filter (resulting in options that don't include their selection), then closes the dropdown without selecting, the button incorrectly shows the placeholder instead of the selected option's label. This happens because the reset logic at lines 970-977 only resets searchValue when internalFilteredOptions is empty, not when it simply doesn't contain the selected option.
Additional Locations (1)
| if (focusedIndex.value >= 0 && focusedIndex.value < enabled.length) { | ||
| handleSelect(enabled[focusedIndex.value]); | ||
| } | ||
| break; |
There was a problem hiding this comment.
Bug: Space key prevents typing spaces in search input
When the dropdown is open and filtrable is true, pressing the space key in the search input calls event.preventDefault() unconditionally before checking if there's a focused option to select. Since focusedIndex is set to -1 when the dropdown opens in filtrable mode (line 903), the selection condition fails but the space character is still prevented from being typed. Users cannot include spaces in their search queries, which breaks search functionality for multi-word terms.
…t' props to prevent duplicate alerts
9c98658 to
de673e4
Compare
Jira: LIB-1918
Va rilavorata completamente.
La Typeahead è stata sostituita da
FzSelectcon propfilterable.La nuova Typeahead è da riprogettare e implementare. Andrebbe deprecata questa.
Note
Introduce a new FzTypeahead component (with docs, stories, and tests) and refactor FzSelect lazy-loading/UX; update Storybook with comprehensive demos.
FzTypeaheadwith Fuse.js/custom async filtering, lazy loading, grouped/disabled options, environment-aware sizing, icons, help/error slots, and full keyboard/a11y support.FzTypeaheadButton,FzTypeaheadOptionsList,FzTypeaheadLabel,FzTypeaheadHelpError), sharedcommon.ts, and utilities.options,filterFn,filtrable,optionsToShow,clearable,environment,position,teleport, etc.; deprecates legacy props.visibleOptionsarray with computed based onloadedOptionsCount; adjust watchers and scroll handling; minor help/error rendering tweak.@fiscozen/selectto1.0.0-next.1.apps/storybook/src/FzTypeahead.mdx) and overhaul stories with interactiveplaytests covering states, positioning, filtering, and lazy loading.FzTypeahead(a11y, keyboard nav, filtering, lazy loading, focus management).Written by Cursor Bugbot for commit de673e4. This will update automatically on new commits. Configure here.