diff --git a/app/srv/ws/sync/code/utlis/local-routers.ts b/app/srv/ws/sync/code/utlis/local-routers.ts index fefdbd05..03ebfc04 100644 --- a/app/srv/ws/sync/code/utlis/local-routers.ts +++ b/app/srv/ws/sync/code/utlis/local-routers.ts @@ -37,7 +37,7 @@ export const router = { ${[...imports].map((e) => `${e.replace(/\W/g, "_")}`).join(",\n ")} } `.trim(); - content = `// AUTOGENERATED - DO NOT EDIT //\n\n${content}`; + content = `/** AUTOGENERATED - DO NOT EDIT **/\n\n${content}`; const hash = simpleHash(content); const router = Bun.file( diff --git a/app/web/src/nova/ed/panel/tree/search.tsx b/app/web/src/nova/ed/panel/tree/search.tsx index 2a55bda8..15e3e4a7 100644 --- a/app/web/src/nova/ed/panel/tree/search.tsx +++ b/app/web/src/nova/ed/panel/tree/search.tsx @@ -12,7 +12,7 @@ export const EdTreeSearch = () => { focus: false, hover: false, cursor: null as number | null, - search_timeout: null as any + search_timeout: null as any, }); p.ui.tree.search_ref = local.sref; @@ -122,13 +122,20 @@ export const doTreeSearch = (p: PG) => { ptree = p.comp.list[active.comp_id].tree; } - const comp_searched = new Set() + const comp_searched = new Set(); const searchInPTree = (ptree: NodeModel[], id_component?: string) => { if (p.ui.tree.search_mode.Name) { const found = fuzzy(ptree, "text", search); + const id_found = ptree.find((e) => e.id === search); let i = 0; + + if (id_found) { + tree[id_found.id] = { idx: 0, node: { ...id_found, parent: "root" } }; + i = 1; + } + for (const row of found) { if (row.data) { if (id_component && row.data.parent) @@ -183,7 +190,7 @@ export const doTreeSearch = (p: PG) => { } } } - } + }; searchInPTree(ptree);