-
Notifications
You must be signed in to change notification settings - Fork 403
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: preload options to lookup field #523
fix: preload options to lookup field #523
Conversation
fetchedOptions = fetchedOptions.filter( | ||
(option: FieldOption) => option.value !== selectedOption.value | ||
); | ||
fetchedOptions = [selectedOption, ...fetchedOptions]; |
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 this to guarantee that the selected option appears at the top?
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.
I think so 😬 just manually setting the order
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 this the preferred experience for when an option is already selected?
I was going through the JIRA ticket and the slack thread but couldn't see it mentioned there.
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.
It is the same experience as in Lookup Field in Support and we want to make this fields almost the same.
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.
Got it! 👍🏼
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.
I tested the branch and it looks good! I agree this is a much better experience 👍🏼
Caching the api responses could reduce the amount of calls needed but we can always add that later on if needed.
🎉 This PR is included in version 4.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Jira issue
When the combobox is focused and the input text is empty, the user will see a list of options retrieved from the Autocomplete API. The list is limited to 100 options maximum. The selected option is shown as the second option on the list after empty option.
The search icon is removed from the field.
Screenshots
Checklist