From f3fbff6dd09aa8ea114ee83c3a372dff113c2372 Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:38:55 +0800 Subject: [PATCH] fix: revert devtools-kit removals in #664 (#670) --- packages/devtools-kit/src/ctx/hook.ts | 2 +- packages/devtools-kit/src/ctx/inspector.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/devtools-kit/src/ctx/hook.ts b/packages/devtools-kit/src/ctx/hook.ts index 007ff59e..479e1bd1 100644 --- a/packages/devtools-kit/src/ctx/hook.ts +++ b/packages/devtools-kit/src/ctx/hook.ts @@ -248,7 +248,7 @@ export function createDevToolsCtxHooks() { const _payload = { app: plugin.descriptor.app, inspectorId, - filter: inspector?.treeFilterPlaceholder || '', + filter: inspector?.treeFilter || '', rootNodes: [], } diff --git a/packages/devtools-kit/src/ctx/inspector.ts b/packages/devtools-kit/src/ctx/inspector.ts index 1143517b..c67ddad7 100644 --- a/packages/devtools-kit/src/ctx/inspector.ts +++ b/packages/devtools-kit/src/ctx/inspector.ts @@ -13,6 +13,7 @@ interface DevToolsKitInspector { descriptor: PluginDescriptor treeFilterPlaceholder: string stateFilterPlaceholder: string + treeFilter: string selectedNodeId: string appRecord: unknown } @@ -34,6 +35,7 @@ export function addInspector(inspector: CustomInspectorOptions, descriptor: Plug descriptor, treeFilterPlaceholder: inspector.treeFilterPlaceholder ?? 'Search tree...', stateFilterPlaceholder: inspector.stateFilterPlaceholder ?? 'Search state...', + treeFilter: '', selectedNodeId: '', appRecord: getAppRecord(descriptor.app), })