Fix table resetting state more often than desired
This commit is contained in:
parent
3b7a5c0392
commit
d1b3d033dd
|
@ -62,8 +62,8 @@ export const initialise = context => {
|
||||||
const { datasource, fetch, filter, sort, definition } = context
|
const { datasource, fetch, filter, sort, definition } = context
|
||||||
|
|
||||||
// Wipe filter whenever table ID changes to avoid using stale filters
|
// Wipe filter whenever table ID changes to avoid using stale filters
|
||||||
definition.subscribe(() => {
|
datasource.subscribe($datasource => {
|
||||||
if (get(datasource)?.type !== "table") {
|
if ($datasource?.type !== "table") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
filter.set([])
|
filter.set([])
|
||||||
|
|
Loading…
Reference in New Issue