Reset data ui searches when mutating rows as we cannot guarantee that bookmarks are the same
This commit is contained in:
parent
44a3390200
commit
7f08ef3a6c
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue