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") {
|
||||
await API.saveTable(newDefinition)
|
||||
} 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 Table from "./table"
|
||||
import * as ViewV2 from "./viewV2"
|
||||
import * as Datasource from "./datsource"
|
||||
import * as Datasource from "./datasource"
|
||||
|
||||
const DependencyOrderedStores = [
|
||||
// Common stores
|
||||
|
|
|
@ -15,6 +15,8 @@ export const initialise = context => {
|
|||
// Update fetch when sorting changes
|
||||
sort.subscribe($sort => {
|
||||
if (get(datasource)?.type === "table") {
|
||||
console.log("update", $sort)
|
||||
console.log(get(fetch))
|
||||
get(fetch)?.update({
|
||||
sortOrder: $sort.order,
|
||||
sortColumn: $sort.column,
|
||||
|
|
Loading…
Reference in New Issue