Skip to content

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

Merged
merged 5 commits into from
Sep 19, 2017

Conversation

lucas-issa
Copy link
Contributor

No description provided.

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. |
Copy link
Owner

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.

Copy link
Contributor Author

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);
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

@lucas-issa lucas-issa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@sam-jg
Copy link

sam-jg commented Sep 19, 2017

Any update on this? Could really use it at the moment.

@jakezatecky jakezatecky merged commit 27bf3b2 into jakezatecky:v1.1.0-dev Sep 19, 2017
@jakezatecky
Copy link
Owner

Soon. Might ship out a new release later this week.

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.

3 participants