diff --git a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx index 3a2f70c1..2a273185 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx @@ -286,20 +286,53 @@ export const EdPropInstanceOptions: FC<{ item.options.map((child, idx) => { let checked: any[] = found.checked; + const sub_found = checked.find((e) => { + if (!item.options) { + return e === child.value; + } else { + if ( + typeof e === "object" && + e.value === child.value + ) { + return true; + } + return false; + } + }); return ( - { - found.checked = newval; - - onChange(JSON.stringify(val), child); - local.render(); - }} - /> + + { + found.checked = newval; + onChange(JSON.stringify(val), child); + local.render(); + }} + /> + {child.options && + sub_found && + child.options.map((item, sidx) => { + const checked: any[] = sub_found.checked; + return ( + { + sub_found.checked = newval; + onChange(JSON.stringify(val), item); + local.render(); + }} + /> + ); + })} + ); })}