Skip to content

Commit

Permalink
feat!: update Autosuggest component to better support freeform and se…
Browse files Browse the repository at this point in the history
…lected values (#2899)

This updates the Autosuggest component to provide the consumer with:
* The value entered in the textbox by the user
* The selected value (as it is displayed in the dropdown)
* The id of the selected option

This also allows the consumer to determine if the Autosuggest component should be in an error state when
* No text has been entered
* Text has been entered, but not selection has been made
* An external validation check has failed - "customError"

The consumer will provide error messages for the appropriate error states

BREAKING CHANGE: value of Autosuggest component is now an object instead of a string
BREAKING CHANGE: Autosuggest component now uses onChange instead of onSelected
BREAKING CHANGE: Autosuggest component now takes in different error messages for value/selection required, and custom errors

---------

Co-authored-by: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com>
Co-authored-by: Kyr <40792129+khudym@users.noreply.github.com>
Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
  • Loading branch information
4 people authored Jan 18, 2024
1 parent e187749 commit 35485ef
Show file tree
Hide file tree
Showing 4 changed files with 511 additions and 327 deletions.
Loading

0 comments on commit 35485ef

Please sign in to comment.