1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Reset data ui searches when mutating rows as we cannot guarantee that bookmarks are the same

This commit is contained in:
Andrew Kingston 2021-09-30 13:49:09 +01:00
parent 1ff4cc3927
commit 19ae31240b

View file

@ -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()
}
</script>
<div>
@ -71,7 +77,7 @@
allowEditing
disableSorting
on:updatecolumns={onUpdateColumns}
on:updaterows={search.refresh}
on:updaterows={onUpdateRows}
>
{#if isInternal}
<CreateColumnButton on:updatecolumns={onUpdateColumns} />
@ -79,7 +85,7 @@
{#if schema && Object.keys(schema).length > 0}
{#if !isUsersTable}
<CreateRowButton
on:updaterows={search.refresh}
on:updaterows={onUpdateRows}
title={"Create row"}
modalContentComponent={CreateEditRow}
/>