handle error with no structure

This commit is contained in:
Jan Prochazka
2024-06-03 10:27:25 +02:00
parent d454da325f
commit e8129fd499

View File

@@ -691,7 +691,6 @@
return; return;
} }
openNewTab( openNewTab(
{ {
title: 'Map', title: 'Map',
@@ -1010,6 +1009,8 @@
$: selectedCellsInfo = getSelectedCellsInfo(selectedCells, grider, realColumnUniqueNames, getSelectedRowData()); $: selectedCellsInfo = getSelectedCellsInfo(selectedCells, grider, realColumnUniqueNames, getSelectedRowData());
$: databaseStatus = useDatabaseStatus({ conid, database });
// $: console.log('visibleRealColumns', visibleRealColumns); // $: console.log('visibleRealColumns', visibleRealColumns);
// $: console.log('visibleRowCountUpperBound', visibleRowCountUpperBound); // $: console.log('visibleRowCountUpperBound', visibleRowCountUpperBound);
// $: console.log('rowHeight', rowHeight); // $: console.log('rowHeight', rowHeight);
@@ -1167,7 +1168,6 @@
if (event.target.closest('.inplaceeditor-container')) return; if (event.target.closest('.inplaceeditor-container')) return;
if (event.target.closest('input')) return; if (event.target.closest('input')) return;
shiftDragStartCell = null; shiftDragStartCell = null;
// event.target.closest('table').focus(); // event.target.closest('table').focus();
event.preventDefault(); event.preventDefault();
@@ -1741,7 +1741,11 @@
</script> </script>
{#if !display || (!isDynamicStructure && (!columns || columns.length == 0))} {#if !display || (!isDynamicStructure && (!columns || columns.length == 0))}
{#if $databaseStatus?.name == 'pending' || $databaseStatus?.name == 'checkStructure' || $databaseStatus?.name == 'loadStructure'}
<LoadingInfo wrapper message="Waiting for structure" /> <LoadingInfo wrapper message="Waiting for structure" />
{:else}
<ErrorInfo alignTop message="No structure was loaded, probably table doesn't exist in current database" />
{/if}
{:else if errorMessage} {:else if errorMessage}
<div> <div>
<ErrorInfo message={errorMessage} alignTop /> <ErrorInfo message={errorMessage} alignTop />