diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e18d6c..cbc1635f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * [#127]: Change TypeScript definition of TreeNode's `label` property to `React.ReactNode` to better align with the PropType * [#145]: Fix alignment of many React properties to TypeScript typings +* [#180]: Fix issue where the `id` property did not apply to the top-level CheckboxTree container ## [v1.5.0](https://github.com/jakezatecky/react-checkbox-tree/compare/v1.4.1...v1.5.0) (2019-01-25) diff --git a/src/js/CheckboxTree.js b/src/js/CheckboxTree.js index 90b5228d..2e2a99ae 100644 --- a/src/js/CheckboxTree.js +++ b/src/js/CheckboxTree.js @@ -342,6 +342,7 @@ class CheckboxTree extends React.Component { nodes, nativeCheckboxes, } = this.props; + const { id } = this.state; const treeNodes = this.renderTreeNodes(nodes); const className = classNames({ @@ -352,7 +353,7 @@ class CheckboxTree extends React.Component { }); return ( -