mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 15:13:57 +00:00
use get_current_component from svelte/internal
This commit is contained in:
@@ -9,7 +9,7 @@ export interface GlobalCommand {
|
|||||||
id: string;
|
id: string;
|
||||||
category: string;
|
category: string;
|
||||||
name: string;
|
name: string;
|
||||||
text: string /* category: name */;
|
text?: string /* category: name */;
|
||||||
keyText?: string;
|
keyText?: string;
|
||||||
getSubCommands?: () => SubCommand[];
|
getSubCommands?: () => SubCommand[];
|
||||||
onClick?: Function;
|
onClick?: Function;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { GridDisplay } from 'dbgate-datalib';
|
import { GridDisplay } from 'dbgate-datalib';
|
||||||
|
import { get_current_component } from 'svelte/internal';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { writable, get, derived } from 'svelte/store';
|
import { writable, get, derived } from 'svelte/store';
|
||||||
import registerCommand from '../commands/registerCommand';
|
import registerCommand from '../commands/registerCommand';
|
||||||
@@ -37,9 +38,9 @@
|
|||||||
export let conid = undefined;
|
export let conid = undefined;
|
||||||
export let database = undefined;
|
export let database = undefined;
|
||||||
export let frameSelection = undefined;
|
export let frameSelection = undefined;
|
||||||
export let instance = undefined;
|
|
||||||
|
|
||||||
const wheelRowCount = 5;
|
const wheelRowCount = 5;
|
||||||
|
const instance = get_current_component();
|
||||||
|
|
||||||
let containerHeight = 0;
|
let containerHeight = 0;
|
||||||
let containerWidth = 0;
|
let containerWidth = 0;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
let allRowCount = null;
|
let allRowCount = null;
|
||||||
let errorMessage = null;
|
let errorMessage = null;
|
||||||
let loadNextDataToken = 0;
|
let loadNextDataToken = 0;
|
||||||
let domComponent;
|
|
||||||
|
|
||||||
async function loadNextData() {
|
async function loadNextData() {
|
||||||
if (isLoading) return;
|
if (isLoading) return;
|
||||||
@@ -87,6 +86,4 @@
|
|||||||
{...$$props}
|
{...$$props}
|
||||||
loadNextData={handleLoadNextData}
|
loadNextData={handleLoadNextData}
|
||||||
{grider}
|
{grider}
|
||||||
bind:this={domComponent}
|
|
||||||
instance={domComponent}
|
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user