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 b89ee4a6..b27370cc 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 @@ -295,12 +295,95 @@ export const EdPropInstanceOptions: FC<{ ` )} > - +
+ {Array.isArray(local.options) && + local.options.map((item, idx) => { + const val: any[] = Array.isArray(evalue) + ? evalue + : []; + const found = val.find((e) => { + if (!item.options) { + return e === item.value; + } else { + if ( + typeof e === "object" && + e.value === item.value + ) { + return true; + } + return false; + } + }); + return ( + + { + onChange(JSON.stringify(val), item); + local.render(); + }} + /> + {item.options && + found && + item.options.map((child, idx) => { + const sub_found = found.checked.find( + (e: any) => { + if (!item.options) { + return e === child.value; + } else { + if ( + typeof e === "object" && + e.value === child.value + ) { + return true; + } + return false; + } + } + ); + return ( + + { + onChange(JSON.stringify(val), child); + local.render(); + }} + /> + {child.options && + sub_found && + child.options.map((item, sidx) => { + return ( + { + onChange( + JSON.stringify(val), + item + ); + local.render(); + }} + /> + ); + })} + + ); + })} + + ); + })} +
} asChild