From c3755bf1eb14eadd4fb9b2cedb2024908f103ff6 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 1 Nov 2024 00:35:10 +0800 Subject: [PATCH] fix: revert devtools-kit removals by #664 --- 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), })