use get_current_component from svelte/internal

This commit is contained in:
Jan Prochazka
2021-02-28 08:36:02 +01:00
parent 8a4fd302d2
commit 1c0a8cad56
3 changed files with 3 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ export interface GlobalCommand {
id: string;
category: string;
name: string;
text: string /* category: name */;
text?: string /* category: name */;
keyText?: string;
getSubCommands?: () => SubCommand[];
onClick?: Function;

View File

@@ -15,6 +15,7 @@
<script lang="ts">
import { GridDisplay } from 'dbgate-datalib';
import { get_current_component } from 'svelte/internal';
import _ from 'lodash';
import { writable, get, derived } from 'svelte/store';
import registerCommand from '../commands/registerCommand';
@@ -37,9 +38,9 @@
export let conid = undefined;
export let database = undefined;
export let frameSelection = undefined;
export let instance = undefined;
const wheelRowCount = 5;
const instance = get_current_component();
let containerHeight = 0;
let containerWidth = 0;

View File

@@ -15,7 +15,6 @@
let allRowCount = null;
let errorMessage = null;
let loadNextDataToken = 0;
let domComponent;
async function loadNextData() {
if (isLoading) return;
@@ -87,6 +86,4 @@
{...$$props}
loadNextData={handleLoadNextData}
{grider}
bind:this={domComponent}
instance={domComponent}
/>