From 110d5d5a35441fecb8c3a0ee6033fa1cbf0071ba Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 3 Mar 2023 09:07:48 +0000 Subject: [PATCH] Lint and remove unused deps --- .../frontend-core/src/components/sheet/DeleteButton.svelte | 2 +- packages/frontend-core/src/components/sheet/NewRow.svelte | 1 + packages/frontend-core/src/components/sheet/Sheet.svelte | 4 ---- packages/frontend-core/src/components/sheet/SheetRow.svelte | 1 + .../frontend-core/src/components/sheet/StickyColumn.svelte | 6 +++++- packages/frontend-core/src/components/sheet/stores/rows.js | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/frontend-core/src/components/sheet/DeleteButton.svelte b/packages/frontend-core/src/components/sheet/DeleteButton.svelte index a7295c88f3..26b9d6cfa6 100644 --- a/packages/frontend-core/src/components/sheet/DeleteButton.svelte +++ b/packages/frontend-core/src/components/sheet/DeleteButton.svelte @@ -2,7 +2,7 @@ import { Modal, ModalContent, Button } from "@budibase/bbui" import { getContext } from "svelte" - const { selectedRows, rows, selectedCellId } = getContext("spreadsheet") + const { selectedRows, rows } = getContext("spreadsheet") let modal diff --git a/packages/frontend-core/src/components/sheet/NewRow.svelte b/packages/frontend-core/src/components/sheet/NewRow.svelte index 394e0ebbeb..bb52767705 100644 --- a/packages/frontend-core/src/components/sheet/NewRow.svelte +++ b/packages/frontend-core/src/components/sheet/NewRow.svelte @@ -17,6 +17,7 @@
($hoveredRowId = "new")} on:mouseleave={() => ($hoveredRowId = null)} > diff --git a/packages/frontend-core/src/components/sheet/Sheet.svelte b/packages/frontend-core/src/components/sheet/Sheet.svelte index 5fedba5c1b..a61474501a 100644 --- a/packages/frontend-core/src/components/sheet/Sheet.svelte +++ b/packages/frontend-core/src/components/sheet/Sheet.svelte @@ -10,10 +10,8 @@ import { createInterfaceStores } from "./stores/interface" import DeleteButton from "./DeleteButton.svelte" import SheetBody from "./SheetBody.svelte" - import SheetRow from "./SheetRow.svelte" import ResizeOverlay from "./ResizeOverlay.svelte" import HeaderRow from "./HeaderRow.svelte" - import NewRow from "./NewRow.svelte" import { createAPIClient } from "../../api" import ScrollOverlay from "./ScrollOverlay.svelte" import StickyColumn from "./StickyColumn.svelte" @@ -24,8 +22,6 @@ export let allowAddRows = true export let allowSelectRows = true export let filter - // export let sortColumn - // export let sortOrder // Sheet constants const cellHeight = 40 diff --git a/packages/frontend-core/src/components/sheet/SheetRow.svelte b/packages/frontend-core/src/components/sheet/SheetRow.svelte index 33c4a1b5d5..632047467f 100644 --- a/packages/frontend-core/src/components/sheet/SheetRow.svelte +++ b/packages/frontend-core/src/components/sheet/SheetRow.svelte @@ -20,6 +20,7 @@
($hoveredRowId = row._id)} on:mouseleave={() => ($hoveredRowId = null)} > diff --git a/packages/frontend-core/src/components/sheet/StickyColumn.svelte b/packages/frontend-core/src/components/sheet/StickyColumn.svelte index f49f9ee5f5..3768ea5c7f 100644 --- a/packages/frontend-core/src/components/sheet/StickyColumn.svelte +++ b/packages/frontend-core/src/components/sheet/StickyColumn.svelte @@ -144,7 +144,11 @@ {/each} {#if $config.allowAddRows} -
($hoveredRowId = "new")}> +
($hoveredRowId = "new")} + > { // Local stores for managing fetching data const query = derived(filter, $filter => buildLuceneQuery($filter)) - const fetch = derived([tableId, filter], ([$tableId, $filter]) => { + const fetch = derived([tableId, query], ([$tableId, $query]) => { if (!$tableId) { return null } @@ -37,7 +37,7 @@ export const createRowsStore = context => { options: { sortColumn: null, sortOrder: null, - query: get(query), + query: $query, limit: 100, paginate: true, },