mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 10:36:01 +00:00
scripting engine
This commit is contained in:
@@ -4,11 +4,12 @@ import { JslGridDisplay, createGridConfig, createGridCache } from '@dbgate/datal
|
||||
import useFetch from '../utility/useFetch';
|
||||
|
||||
export default function JslDataGrid({ jslid }) {
|
||||
const columns = useFetch({
|
||||
const info = useFetch({
|
||||
params: { jslid },
|
||||
url: 'jsldata/get-info',
|
||||
defaultValue: [],
|
||||
defaultValue: {},
|
||||
});
|
||||
const columns = (info && info.columns) || [];
|
||||
const [config, setConfig] = React.useState(createGridConfig());
|
||||
const [cache, setCache] = React.useState(createGridCache());
|
||||
const display = React.useMemo(() => new JslGridDisplay(jslid, columns, config, setConfig, cache, setCache), [
|
||||
|
||||
Reference in New Issue
Block a user