mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#8805 do not move focus on programmatic tab select (#4248)
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
This commit is contained in:
@@ -125,7 +125,7 @@ export const TabsState = observer(function TabsState<T = Record<string, any>>({
|
||||
const tabExists = isNotNullDefined(selectedId) && displayed.includes(selectedId);
|
||||
|
||||
if (!tabExists) {
|
||||
dynamic.store.select(displayed[0]);
|
||||
dynamic.store.setSelectedId(displayed[0]);
|
||||
}
|
||||
}
|
||||
}, [displayed, autoSelect]);
|
||||
@@ -141,7 +141,7 @@ export const TabsState = observer(function TabsState<T = Record<string, any>>({
|
||||
}
|
||||
dynamic.selectedId = data.tabId;
|
||||
if (dynamic.store.getState().selectedId !== data.tabId) {
|
||||
dynamic.store.select(data.tabId);
|
||||
dynamic.store.setSelectedId(data.tabId);
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user