-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Try adding generic entity search component with combobox component #73469
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
base: trunk
Are you sure you want to change the base?
Conversation
|
Size Change: +8 kB (+0.32%) Total Size: 2.55 MB
ℹ️ View Unchanged
|
| label="Select a post" | ||
| value={ url } | ||
| onChange={ setUrl } | ||
| suggestionsQuery={ { type: 'post', subtype: 'post' } } |
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 always disliked this API. It's a configuration based approach that ends up leading to prop bloat.
I wonder if we could lean into allow the consumer to define their own fetching approach. Maybe that's passing in fetchLinkSuggestions or maybe that's passing in their own custom implementation?
Alternate approach to #71457 and #71452
What?
Closes #73310
Adds a generic entity search component using the
<ComboboxControl/>Why?
Add a link search to the inspector sidebar. I wanted to see how it might work using the combobox instead of extracting the link ui search. The LinkUI search is pretty bound to the popover, so I wanted to see how it might work.
How?
Create a new component called
<EntitySearch />and build out similar functionality to the LinkControl searchTesting Instructions
Testing Instructions for Keyboard
Screenshots or screencast