Skip to content

Conversation

@zaki-yama
Copy link
Contributor

ref. #289

TODO: after #314 is merged, change base branch to 3.0.

@zaki-yama zaki-yama self-assigned this Jun 17, 2019
onNodeToggle,
onNodeLabelClick,
toggleOnNodeClick,
/* eslint-enable @typescript-eslint/no-unused-vars */
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@stomita stomita mentioned this pull request Jun 21, 2019
41 tasks
@zaki-yama
Copy link
Contributor Author

Closed because the last PR #342 had been merged.

@zaki-yama zaki-yama closed this Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants