-
Notifications
You must be signed in to change notification settings - Fork 28
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
Discuss API v4 #46
Comments
These are the main points I would like to cover in the new API:
|
Regarding the 'show tooltip on disabled buttons', it would be most convenient to just have a prop or attribute to flag whether you want the tooltip to still show if it's disabled. |
@drosko I guess it's doable with the current API, something like this: <button
disabled={this.state.disabled}
data-rh={this.state.disabled ? undefined : 'a tooltip'}
/> |
I was going to say that it would be nice if React Hint let you display a custom tooltip by suppling a JSX element or render prop like
This would be "better" than ReactHint's onRenderContent since you can supply different tooltip JSX for each element. But since data attributes can only have string values this doesn't seem possible. Seems like using Popper.js directly is the still the best option for this use case. |
@srmagura The difference here is that Popper.js creates an instance per tooltip, thus having hundreds of elements on the page might slow things down. React-hint was created to avoid such situations. It might seem to be inconvenient at first, but this approach allows to have both: performance AND versatility. |
As I am slooooooowly working on the next API, I guess it makes sense to gather all the feedback and ideas, and feature requests before it gets cut in stone. I am going to write down some of my thoughts about the new API and show what I have in mind.
Folks, if you have major pain points with the current API, I would like to know about them and discuss what could be improved.
The text was updated successfully, but these errors were encountered: