Skip to content

Conversation

@lucas-issa
Copy link
Contributor

No description provided.

| `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.

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