mongo data grid works

This commit is contained in:
Jan Prochazka
2021-04-02 19:54:09 +02:00
parent 55cc51d24a
commit 18860c823d
5 changed files with 45 additions and 30 deletions

View File

@@ -11,6 +11,7 @@
},
data: {
options: {
pureName: props.pureName,
limit,
skip: offset,
},
@@ -22,9 +23,10 @@
}
function dataPageAvailable(props) {
const { display } = props;
const sql = display.getPageQuery(0, 1);
return !!sql;
return true;
// const { display } = props;
// const sql = display.getPageQuery(0, 1);
// return !!sql;
}
async function loadRowCount(props) {
@@ -39,6 +41,7 @@
},
data: {
options: {
pureName: props.pureName,
countDocuments: true,
},
},
@@ -77,7 +80,7 @@
// export let onChangeGrider = undefined;
let loadedRows = [];
export let loadedRows = [];
// $: console.log('loadedRows BIND', loadedRows);
$: grider = new ChangeSetGrider(

View File

@@ -27,6 +27,8 @@
export let showReferences = false;
export let showMacros;
export let loadedRows;
let selectedCellsPublished = [];
const selectedMacro = writable(null);
@@ -93,6 +95,7 @@
macroValues={extractMacroValuesForMacro($macroValues, $selectedMacro)}
macroPreview={$selectedMacro}
{selectedCellsPublished}
bind:loadedRows
/>
{/if}
</svelte:fragment>

View File

@@ -28,6 +28,8 @@
export let schemaName;
export let pureName;
let loadedRows;
const config = useGridConfig(tabid);
const cache = writable(createGridCache());
@@ -50,12 +52,15 @@
$config,
config.update,
$cache,
cache.update
cache.update,
loadedRows
)
: null;
// $: console.log('LOADED ROWS MONGO', loadedRows);
</script>
<DataGrid
bind:loadedRows
{...$$props}
config={$config}
setConfig={config.update}