MCPcopy Create free account
hub / github.com/bytebase/bytebase / updateTab

Function updateTab

frontend/src/react/stores/sqlEditor/tab.ts:267–277  ·  view source on GitHub ↗
(id, payload)

Source from the content-addressed store, hash-verified

265 },
266
267 updateTab(id, payload) {
268 if (!get().tabsById.has(id)) return undefined;
269 set((s) => {
270 const tab = s.tabsById.get(id);
271 if (!tab) return;
272 Object.assign(tab, payload);
273 upsertOpenTabDraft(s, tab, false);
274 });
275 persistOpenTabs(get().openTmpTabList);
276 return get().tabsById.get(id);
277 },
278
279 updateCurrentTab(payload) {
280 const id = get().currentTabId;

Callers

nothing calls this directly

Calls 5

getFunction · 0.85
setFunction · 0.85
upsertOpenTabDraftFunction · 0.85
persistOpenTabsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected