Skip to content

Commit 8575f9f

Browse files
committed
type fix
1 parent bdbf875 commit 8575f9f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/components/src/HierarchicalCheckboxMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Button from './Button';
99

1010
export type HierarchicalCheckboxValueMap = Map<
1111
string,
12-
boolean | Map<string, boolean>
12+
boolean | HierarchicalCheckboxValueMap
1313
>;
1414

1515
type HierarchicalCheckboxMenuProps = {
@@ -199,7 +199,7 @@ class HierarchicalCheckboxMenu extends Component<
199199
<Checkbox
200200
className="hcm-child"
201201
key={child}
202-
checked={value}
202+
checked={typeof value === 'boolean' ? value : null}
203203
onChange={() => this.toggleValueFor(parent, child)}
204204
>
205205
{child}

0 commit comments

Comments
 (0)