Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(settings): panel stealing focus on splits change (#2904)

dev-rbfeb845755069
diff --git a/js/app/packages/core/constant/SettingsState.tsx b/js/app/packages/core/constant/SettingsState.tsx
index 8761a02086..57be8665c4 100644
--- a/js/app/packages/core/constant/SettingsState.tsx
+++ b/js/app/packages/core/constant/SettingsState.tsx
@@ -1,6 +1,6 @@
import { useSplitLayout } from '@app/component/split-layout/layout';
import { globalSplitManager } from '@app/signal/splitLayout';
-import { createSignal } from 'solid-js';
+import { createMemo, createSignal } from 'solid-js';
export type SettingsTab =
| 'Account'
@@ -29,9 +29,9 @@ export const useSettingsState = () => {
});
};
- const isOpen = () => {
+ const isOpen = createMemo(() => {
return getSettingsSplit() !== undefined;
- };
+ });
const openSettings = (activeTabId?: SettingsTab) => {
if (activeTabId) setActiveTabId(activeTabId);