-
Notifications
You must be signed in to change notification settings - Fork 86
Rewrite in Typescript: Tree #315
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
Conversation
| onNodeToggle, | ||
| onNodeLabelClick, | ||
| toggleOnNodeClick, | ||
| /* eslint-enable @typescript-eslint/no-unused-vars */ |
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.
https://github.com/mashmatrix/react-lightning-design-system/pull/315/files#diff-b8e1116dcaaf4336c2da8bf811daa6c1L32
Before converting to TypeScript, propTypes were used in cleanProps() to avoid passing unnecessary props (like onNodeClick) to <div> element.
I couldn't replace it with TypeScript's types, so this is a workaround.
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.
If I don't do this, the following runtime warnings occur:
Warning: Unknown event handler property `onNodeClick`. It will be ignored.
Warning: Unknown event handler property `onNodeToggle`. It will be ignored.
Warning: Unknown event handler property `onNodeLabelClick`. It will be ignored.
Warning: React does not recognize the `toggleOnNodeClick` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `toggleonnodeclick` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
|
Closed because the last PR #342 had been merged. |
ref. #289
TODO: after #314 is merged, change base branch to
3.0.