File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
web/libs/editor/src/components/NewTaxonomy Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -85,14 +85,15 @@ const convert = (
85
85
86
86
const convertItem = ( item : TaxonomyItem ) : AntTaxonomyItem => {
87
87
const value = item . path . join ( options . pathSeparator ) ;
88
- const disabledNode = options . leafsOnly && ( item . isLeaf === false || ! ! item . children ) ;
88
+ const isLeaf = item . isLeaf !== false && ! item . children ?. length ;
89
+ const disabledNode = options . leafsOnly && ! isLeaf ;
89
90
const maxUsagesReached = options . maxUsagesReached && ! selectedPaths . includes ( value ) ;
90
91
91
92
return {
92
93
title : enrich ( item ) ,
93
94
value,
94
95
key : value ,
95
- isLeaf : item . isLeaf !== false && ! item . children ,
96
+ isLeaf,
96
97
disableCheckbox : disabledNode || maxUsagesReached ,
97
98
children : item . children ?. map ( convertItem ) ,
98
99
} ;
You can’t perform that action at this time.
0 commit comments