mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 17:26:01 +00:00
persp: fixed loading
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
let errorMessage;
|
let errorMessage;
|
||||||
let isLoading = false;
|
let isLoading = false;
|
||||||
const lastVisibleRowIndexRef = createRef(0);
|
const lastVisibleRowIndexRef = createRef(0);
|
||||||
|
const disableLoadNextRef = createRef(false);
|
||||||
|
|
||||||
async function loadLevelData(node: PerspectiveTreeNode, parentRows: any[], counts) {
|
async function loadLevelData(node: PerspectiveTreeNode, parentRows: any[], counts) {
|
||||||
dbg('load level data', counts);
|
dbg('load level data', counts);
|
||||||
@@ -146,6 +147,7 @@
|
|||||||
|
|
||||||
$: {
|
$: {
|
||||||
display;
|
display;
|
||||||
|
disableLoadNextRef.set(false);
|
||||||
checkLoadAdditionalData();
|
checkLoadAdditionalData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,10 +221,11 @@
|
|||||||
if (!display) return;
|
if (!display) return;
|
||||||
await tick();
|
await tick();
|
||||||
if (!domTable) return;
|
if (!domTable) return;
|
||||||
|
if (disableLoadNextRef.get()) return;
|
||||||
|
|
||||||
const rowIndex = getLastVisibleRowIndex();
|
const rowIndex = getLastVisibleRowIndex();
|
||||||
|
|
||||||
console.log('LAST VISIBLE', rowIndex);
|
// console.log('LAST VISIBLE', rowIndex);
|
||||||
|
|
||||||
const growIndicators = _.keys(display.loadIndicatorsCounts).filter(
|
const growIndicators = _.keys(display.loadIndicatorsCounts).filter(
|
||||||
indicator => rowIndex + 1 >= display.loadIndicatorsCounts[indicator]
|
indicator => rowIndex + 1 >= display.loadIndicatorsCounts[indicator]
|
||||||
@@ -233,6 +236,7 @@
|
|||||||
// console.log('rowIndex', rowIndex);
|
// console.log('rowIndex', rowIndex);
|
||||||
|
|
||||||
if (growIndicators.length > 0) {
|
if (growIndicators.length > 0) {
|
||||||
|
disableLoadNextRef.set(true);
|
||||||
dbg('load next', growIndicators);
|
dbg('load next', growIndicators);
|
||||||
loadedCounts.update(counts => {
|
loadedCounts.update(counts => {
|
||||||
const res = { ...counts };
|
const res = { ...counts };
|
||||||
|
|||||||
Reference in New Issue
Block a user