From 19ae31240b309a200d9bec943d72581fbdcb6357 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 30 Sep 2021 13:49:09 +0100 Subject: [PATCH] Reset data ui searches when mutating rows as we cannot guarantee that bookmarks are the same --- .../src/components/backend/DataTable/DataTable.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 00b20d4a09..1cba1c31d9 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -56,6 +56,12 @@ schema, }) } + + // Fetch data whenever rows are modified. Unfortunately we have to lose + // our pagination place, as our bookmarks will have shifted. + const onUpdateRows = () => { + search.update() + }
@@ -71,7 +77,7 @@ allowEditing disableSorting on:updatecolumns={onUpdateColumns} - on:updaterows={search.refresh} + on:updaterows={onUpdateRows} > {#if isInternal} @@ -79,7 +85,7 @@ {#if schema && Object.keys(schema).length > 0} {#if !isUsersTable}