[Breaking] Proposal to handle selectedValue on the client side #191
Labels
P1
High Priority: This is a show stopper and must be addressed immediately
Proposal
A detailed proposal for change to Searchfield.
severe: new feature
Request for a new capability or a feature
This issue proposes a change in how the value is selected in the SearchField component. Several bugs have been reported, such as breakdowns in keyboard navigation and selection highlighting. These issues can be resolved by explicitly managing the selectedValue in the consumer code.
Currently, the package automatically sets the selectedValue in the input field, which causes inconsistencies, especially when dealing with keyboard navigation and item highlighting.
Before
The package sets the selectedValue automatically inside the component, which leads to issues when navigating or selecting suggestions
After
We suggest that the selectedValue be managed explicitly in the client code (consumer code) by using the
onSuggestionTap
callback. This approach simplifies the API and provides more accurate control over the internal state of the package.This change will make it clearer and more predictable how the selected value is handled and displayed, and it will improve keyboard navigation and item highlighting.
The text was updated successfully, but these errors were encountered: