Reset data ui searches when mutating rows as we cannot guarantee that bookmarks are the same
This commit is contained in:
parent
1ff4cc3927
commit
19ae31240b
|
@ -56,6 +56,12 @@
|
||||||
schema,
|
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>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -71,7 +77,7 @@
|
||||||
allowEditing
|
allowEditing
|
||||||
disableSorting
|
disableSorting
|
||||||
on:updatecolumns={onUpdateColumns}
|
on:updatecolumns={onUpdateColumns}
|
||||||
on:updaterows={search.refresh}
|
on:updaterows={onUpdateRows}
|
||||||
>
|
>
|
||||||
{#if isInternal}
|
{#if isInternal}
|
||||||
<CreateColumnButton on:updatecolumns={onUpdateColumns} />
|
<CreateColumnButton on:updatecolumns={onUpdateColumns} />
|
||||||
|
@ -79,7 +85,7 @@
|
||||||
{#if schema && Object.keys(schema).length > 0}
|
{#if schema && Object.keys(schema).length > 0}
|
||||||
{#if !isUsersTable}
|
{#if !isUsersTable}
|
||||||
<CreateRowButton
|
<CreateRowButton
|
||||||
on:updaterows={search.refresh}
|
on:updaterows={onUpdateRows}
|
||||||
title={"Create row"}
|
title={"Create row"}
|
||||||
modalContentComponent={CreateEditRow}
|
modalContentComponent={CreateEditRow}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue