You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of toggle in the Tooltip component doesn't allow to have access to the event object from a custom toggle (custom handler passed through props)
toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle();
}
The this.props.toggle() is not called with the e object which will give access to the event property from the custom handler (to decide for example what to do depending on the type of the event that triggered this toggle)
And although is prepared to receive the event object (e) is not called with this data in almost any of the calls.
What should be happening?
The props.toggle should be called with the e object
toggle(e) {
if (this.props.disabled) {
return e && e.preventDefault();
}
return this.props.toggle(e);
}
The text was updated successfully, but these errors were encountered:
Issue description
Tooltip
6.1.0
What is happening?
The current implementation of
toggle
in theTooltip
component doesn't allow to have access to theevent
object from a customtoggle
(custom handler passed through props)The
this.props.toggle()
is not called with thee
object which will give access to the event property from the custom handler (to decide for example what to do depending on the type of the event that triggered thistoggle
)And although is prepared to receive the event object (
e
) is not called with this data in almost any of the calls.What should be happening?
The
props.toggle
should be called with thee
objectThe text was updated successfully, but these errors were encountered: