-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Autocomplete] added new prop called ListOptionComponent #19235
Conversation
Details of bundle changes.Comparing: c5e1ae6...725cfc0
|
4c13146
to
26c4953
Compare
@sherodtaylor Thanks for the proposal. From what I understand, you can solve the problem with the existing API, there is no need to duplicate it. |
@oliviertassinari Can you give me a solution instead of just closing the pr? I've created a demo to show you that the existing api doesn't work ^. Also, it's not duplicating it? What it is doing is allowing control of the actual |
@oliviertassinari The current API doesn't support this? See the code sandbox: I could rework it to use |
@sherodtaylor You would need to customize the CSS of the li element and render the right children. |
From what I understand, supporting this new prop would make the disabled tooltip use case easier for you to implement. |
@oliviertassinari Can you just reopen the PR because you haven't given me a solution. Look at the implementation I can't pass any props to the 'li' because the only rendering is happing in the children. I think it makes sense for the api change as you are able to change the |
Also it's not just for tooltip. If a user wants to modify the I'm happy to keep this closed if you have a solution. Can you fork my code sandbox and take a look please? @oliviertassinari |
@sherodtaylor I believe the key factor is the CSS applied, the DOM structure is secondary. Worth case, you can leverage the
This is very possible. I don't know. JedWatson/react-select#745 makes me believe it's an edge case (no mention to the disabled option problem). I think that if you could open an issue it would be great! As we get upvotes & interactions on the issue, we will consider a different answer. Thanks! |
I found an issue with the implementation of autocomplete. If you look at the PR you generate the props from the
useAutocomplete
hook and pass that directly to theli
. This is an issue because #11601 you are passing disabled directly from that which doesn't allow for theTooltip
workaround on the disabled elements hereWe need to be able to use the
Tooltip
to explain to our users why an item is disabled. See example below: