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
We use a rule eslint - react/require-default-props. And set props.visible as undefined in the defaultProps. And if the props.visible is equal to undefined, then he still gets to extraProps.popupVisible.
@benjycui, No, of course, we do not check node_modules into the style code. :)
We have our UIkit, and we made a wrapper for rcTooltip. In this wrapper we describe props
But I don't agree with this ESLint rule, we can set default prop for defaultXXX, but I don't think we should set default props for controlled props(e.g. value, visible..)
@benjycui I agree with @mochachai, need to check it for undefined. For example in my case I need to use rc-tooltip in two different scenes inside the one component.
Will work like a standard tooltip
Will show preview with always opened tooltip
So I was going to just pass true or undefined in 'visible' props, but now I have to do one trick:
Activity
benjycui commentedon Aug 24, 2017
But why, are you going to lint code in
node_modules.devdammit commentedon Aug 24, 2017
@benjycui, No, of course, we do not check node_modules into the style code. :)
We have our UIkit, and we made a wrapper for rcTooltip. In this wrapper we describe props
benjycui commentedon Aug 25, 2017
Yep, you can PR.
But I don't agree with this ESLint rule, we can set default prop for
defaultXXX, but I don't think we should set default props for controlled props(e.g. value, visible..)oldwin commentedon Nov 29, 2017
@benjycui I agree with @mochachai, need to check it for undefined. For example in my case I need to use rc-tooltip in two different scenes inside the one component.
So I was going to just pass true or undefined in 'visible' props, but now I have to do one trick: