Fix sorting for tables
This commit is contained in:
parent
e3cf0667be
commit
3e97e299bf
|
@ -86,7 +86,7 @@ export const createActions = context => {
|
||||||
if ($datasource.type === "table") {
|
if ($datasource.type === "table") {
|
||||||
await API.saveTable(newDefinition)
|
await API.saveTable(newDefinition)
|
||||||
} else if ($datasource.type === "viewV2") {
|
} else if ($datasource.type === "viewV2") {
|
||||||
await API.viewV2.update({ ...newDefinition })
|
await API.viewV2.update(newDefinition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import * as Filter from "./filter"
|
||||||
import * as Notifications from "./notifications"
|
import * as Notifications from "./notifications"
|
||||||
import * as Table from "./table"
|
import * as Table from "./table"
|
||||||
import * as ViewV2 from "./viewV2"
|
import * as ViewV2 from "./viewV2"
|
||||||
import * as Datasource from "./datsource"
|
import * as Datasource from "./datasource"
|
||||||
|
|
||||||
const DependencyOrderedStores = [
|
const DependencyOrderedStores = [
|
||||||
// Common stores
|
// Common stores
|
||||||
|
|
|
@ -15,6 +15,8 @@ export const initialise = context => {
|
||||||
// Update fetch when sorting changes
|
// Update fetch when sorting changes
|
||||||
sort.subscribe($sort => {
|
sort.subscribe($sort => {
|
||||||
if (get(datasource)?.type === "table") {
|
if (get(datasource)?.type === "table") {
|
||||||
|
console.log("update", $sort)
|
||||||
|
console.log(get(fetch))
|
||||||
get(fetch)?.update({
|
get(fetch)?.update({
|
||||||
sortOrder: $sort.order,
|
sortOrder: $sort.order,
|
||||||
sortColumn: $sort.column,
|
sortColumn: $sort.column,
|
||||||
|
|
Loading…
Reference in New Issue