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 = (
8585
8686 const convertItem = ( item : TaxonomyItem ) : AntTaxonomyItem => {
8787 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 ;
8990 const maxUsagesReached = options . maxUsagesReached && ! selectedPaths . includes ( value ) ;
9091
9192 return {
9293 title : enrich ( item ) ,
9394 value,
9495 key : value ,
95- isLeaf : item . isLeaf !== false && ! item . children ,
96+ isLeaf,
9697 disableCheckbox : disabledNode || maxUsagesReached ,
9798 children : item . children ?. map ( convertItem ) ,
9899 } ;
You can’t perform that action at this time.
0 commit comments