-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix UI-select-extended searchable issues #166
Conversation
@kajambiya was the intention of the video on the description meant to show the searchable demo? |
It was to show that the searchable Ui-Select-Extended control picks a value in edit mode. |
const [savedSearchableItemDisplay, setSavedSearchableItemDisplay] = useState(''); | ||
const [savedSearchableItem, setSavedSearchableItem] = useState({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 states might become confusing. Isn't savedSearchableItemDisplay
derived from savedSearchableItem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Fixed
setSavedSearchableItem(dataItem); | ||
setSavedSearchableItemDisplay(dataItem.display); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why these 2 are separated? it looks like duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Requirements
Summary
The UI-select-extended control has 2 flavours:
Preloaded
(default): Where the data source is loaded on page load and you just search through the items.Searchable
: Data source is not pre loaded but as you type, a request is made to the endpoint to return results matching the search criteria.There were bugs for the
searchable
flavours, i.e in edit mode, it would not pick the saved value. Also in enter mode, it would not show the option for reusing previous value.This PR seeks to resolve the issues above
Screenshots
Screen.Recording.2024-02-01.at.13.57.52.mov
Related Issue
Other