fluent-svelte
fluent-svelte copied to clipboard
Improved AutoSuggessBox & Prevent Close of Flyout
Considering #47
1. AutoSuggessBox.
- [x] Do not auto-select the first element of the array.
Now if the user select the first element, all the events will return the value of Array[0]
- [x] Dispatch 'Select' Event does not make sure to update the current value of the AutoSuggestBox
Fixed and now we will get the updated value.
- [x] Adding the 'on:select' event on component allows better mobile performance
Added on select event,
- [x] Don't auto select any element for just use the arrow key moving
Selections will be triggered with Enter key when focused on an item
2. Flyout
- [x] Don't auto close the flyout when push
Enterkey
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| fluent-svelte | ❌ Failed (Inspect) | Jun 2, 2022 at 7:25PM (UTC) |
I'll take some time later to look over some changes, although just as an initial thought I think that arrow keys should still move selection as to mirror the behavior of the native control. AutoSuggestBox has probably given me the most trouble out of any of the components in terms of behavior due to how inconsistently it tends to behave, so i'll have to think some things through. 👍
I agree that the AutoSuggestBox is quite a complex component. And yes, come to think of it, in certain cases it should auto-select with the arrow keys. What do you think about an optional prop? <AutoSuggestBox enableAutoSelect={true} /> or something like that?