-
Notifications
You must be signed in to change notification settings - Fork 215
1) Add a feature to disable a node. 2) Reduce around 400kB in the transpiled code. 3) Adding support to React node type (string or jsx tags) to the node label. #40
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
Conflicts: src/js/CheckboxTree.js src/js/TreeNode.js src/js/nodeShape.js
README.md
Outdated
| `value` | mixed | **Required**. The node's value. | | ||
| `children` | array | An array of child nodes. | | ||
| `className` | string | A className to add to the node. | | ||
| `icon` | mixed | A custom icon for the node. | | ||
| `disabled` | bool | Disable node. | |
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.
I would prefer disabled
to appear above icon
and below className
to be alphabetically sorted below the required properties.
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.
Ok. No problem.
@@ -190,13 +190,14 @@ class CheckboxTree extends React.Component { | |||
const key = `${node.value}`; | |||
const checked = this.getCheckState(node, noCascade); | |||
const children = this.renderChildNodes(node); | |||
const nodeDisabled = !!(disabled || node.disabled); |
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.
Is there a reason the double negation is being used?
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.
Yes. The disabled property on TreeNode isRequired. The double negation will transform undefined to false.
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.
Changed.
Any update on this? Could really use it at the moment. |
Soon. Might ship out a new release later this week. |
No description provided.