Update sorting and remove logs
This commit is contained in:
parent
9231ce88c6
commit
c573955998
4 changed files with 5 additions and 14 deletions
|
@ -1,10 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getContext } from "svelte"
|
|
||||||
import { ActionButton } from "@budibase/bbui"
|
import { ActionButton } from "@budibase/bbui"
|
||||||
import SortButton from "./controls/SortButton.svelte"
|
import SortButton from "./controls/SortButton.svelte"
|
||||||
|
|
||||||
const { rows } = getContext("sheet")
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SortButton />
|
|
||||||
<ActionButton icon="VisibilityOff" quiet size="M">Hide fields</ActionButton>
|
<ActionButton icon="VisibilityOff" quiet size="M">Hide fields</ActionButton>
|
||||||
|
<SortButton />
|
||||||
|
|
|
@ -128,12 +128,8 @@
|
||||||
{#if $config.allowEditColumns}
|
{#if $config.allowEditColumns}
|
||||||
<MenuItem icon="Edit" on:click={editColumn}>Edit column</MenuItem>
|
<MenuItem icon="Edit" on:click={editColumn}>Edit column</MenuItem>
|
||||||
{/if}
|
{/if}
|
||||||
<MenuItem icon="SortOrderUp" on:click={sortAscending}>
|
<MenuItem icon="SortOrderUp" on:click={sortAscending}>Sort A-Z</MenuItem>
|
||||||
Sort ascending
|
<MenuItem icon="SortOrderDown" on:click={sortDescending}>Sort Z-A</MenuItem>
|
||||||
</MenuItem>
|
|
||||||
<MenuItem icon="SortOrderDown" on:click={sortDescending}>
|
|
||||||
Sort descending
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem disabled={!canMoveLeft} icon="ArrowLeft" on:click={moveLeft}>
|
<MenuItem disabled={!canMoveLeft} icon="ArrowLeft" on:click={moveLeft}>
|
||||||
Move left
|
Move left
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
|
@ -4,15 +4,14 @@
|
||||||
|
|
||||||
const { sort, columns, stickyColumn } = getContext("sheet")
|
const { sort, columns, stickyColumn } = getContext("sheet")
|
||||||
const orderOptions = [
|
const orderOptions = [
|
||||||
{ label: "Ascending", value: "ascending" },
|
{ label: "A-Z", value: "ascending" },
|
||||||
{ label: "Descending", value: "descending" },
|
{ label: "Z-A", value: "descending" },
|
||||||
]
|
]
|
||||||
|
|
||||||
let open = false
|
let open = false
|
||||||
let anchor
|
let anchor
|
||||||
|
|
||||||
$: columnOptions = getColumnOptions($stickyColumn, $columns)
|
$: columnOptions = getColumnOptions($stickyColumn, $columns)
|
||||||
$: console.log($sort)
|
|
||||||
|
|
||||||
const getColumnOptions = (stickyColumn, columns) => {
|
const getColumnOptions = (stickyColumn, columns) => {
|
||||||
let options = []
|
let options = []
|
||||||
|
|
|
@ -196,7 +196,6 @@ export default class DataFetch {
|
||||||
const { query } = get(this.store)
|
const { query } = get(this.store)
|
||||||
|
|
||||||
// Get the actual data
|
// Get the actual data
|
||||||
console.log("===== FETCH =====")
|
|
||||||
let { rows, info, hasNextPage, cursor, error } = await this.getData()
|
let { rows, info, hasNextPage, cursor, error } = await this.getData()
|
||||||
|
|
||||||
// If we don't support searching, do a client search
|
// If we don't support searching, do a client search
|
||||||
|
|
Loading…
Reference in a new issue