mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 21:16:00 +00:00
basic alter table works
This commit is contained in:
@@ -132,6 +132,17 @@ export default function useEditorData({ tabid, reloadToken = 0, loadFromArgs = n
|
||||
saveToStorageDebounced();
|
||||
};
|
||||
|
||||
const clearEditorData = async () => {
|
||||
editorState.update(x => ({
|
||||
...x,
|
||||
value: null,
|
||||
errorMessage: null,
|
||||
isLoading: false,
|
||||
}));
|
||||
await localforage.removeItem(localStorageKey);
|
||||
localStorage.removeItem(localStorageKey);
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('beforeunload', saveToStorageSync);
|
||||
initialLoad();
|
||||
@@ -148,6 +159,7 @@ export default function useEditorData({ tabid, reloadToken = 0, loadFromArgs = n
|
||||
editorState,
|
||||
editorValue,
|
||||
setEditorData,
|
||||
clearEditorData,
|
||||
saveToStorage,
|
||||
saveToStorageSync,
|
||||
initialLoad,
|
||||
|
||||
Reference in New Issue
Block a user