mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 14:16:01 +00:00
use editor data hook
This commit is contained in:
@@ -42,8 +42,7 @@ export function SavedSqlFileAppObject({ data, commonProps }) {
|
||||
onLoad={(data) => {
|
||||
newQuery({
|
||||
title: file,
|
||||
// @ts-ignore
|
||||
initialScript: data,
|
||||
initialData: data,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
@@ -60,14 +59,15 @@ export function SavedShellFileAppObject({ data, commonProps }) {
|
||||
format="text"
|
||||
icon="img shell"
|
||||
onLoad={(data) => {
|
||||
openNewTab(setOpenedTabs, {
|
||||
title: file,
|
||||
icon: 'img shell',
|
||||
tabComponent: 'ShellTab',
|
||||
props: {
|
||||
initialScript: data,
|
||||
openNewTab(
|
||||
setOpenedTabs,
|
||||
{
|
||||
title: file,
|
||||
icon: 'img shell',
|
||||
tabComponent: 'ShellTab',
|
||||
},
|
||||
});
|
||||
data
|
||||
);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user