Lint and remove unused deps
This commit is contained in:
parent
37393c4e2a
commit
110d5d5a35
|
@ -2,7 +2,7 @@
|
||||||
import { Modal, ModalContent, Button } from "@budibase/bbui"
|
import { Modal, ModalContent, Button } from "@budibase/bbui"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
|
|
||||||
const { selectedRows, rows, selectedCellId } = getContext("spreadsheet")
|
const { selectedRows, rows } = getContext("spreadsheet")
|
||||||
|
|
||||||
let modal
|
let modal
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="row"
|
class="row"
|
||||||
|
on:focus
|
||||||
on:mouseover={() => ($hoveredRowId = "new")}
|
on:mouseover={() => ($hoveredRowId = "new")}
|
||||||
on:mouseleave={() => ($hoveredRowId = null)}
|
on:mouseleave={() => ($hoveredRowId = null)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -10,10 +10,8 @@
|
||||||
import { createInterfaceStores } from "./stores/interface"
|
import { createInterfaceStores } from "./stores/interface"
|
||||||
import DeleteButton from "./DeleteButton.svelte"
|
import DeleteButton from "./DeleteButton.svelte"
|
||||||
import SheetBody from "./SheetBody.svelte"
|
import SheetBody from "./SheetBody.svelte"
|
||||||
import SheetRow from "./SheetRow.svelte"
|
|
||||||
import ResizeOverlay from "./ResizeOverlay.svelte"
|
import ResizeOverlay from "./ResizeOverlay.svelte"
|
||||||
import HeaderRow from "./HeaderRow.svelte"
|
import HeaderRow from "./HeaderRow.svelte"
|
||||||
import NewRow from "./NewRow.svelte"
|
|
||||||
import { createAPIClient } from "../../api"
|
import { createAPIClient } from "../../api"
|
||||||
import ScrollOverlay from "./ScrollOverlay.svelte"
|
import ScrollOverlay from "./ScrollOverlay.svelte"
|
||||||
import StickyColumn from "./StickyColumn.svelte"
|
import StickyColumn from "./StickyColumn.svelte"
|
||||||
|
@ -24,8 +22,6 @@
|
||||||
export let allowAddRows = true
|
export let allowAddRows = true
|
||||||
export let allowSelectRows = true
|
export let allowSelectRows = true
|
||||||
export let filter
|
export let filter
|
||||||
// export let sortColumn
|
|
||||||
// export let sortOrder
|
|
||||||
|
|
||||||
// Sheet constants
|
// Sheet constants
|
||||||
const cellHeight = 40
|
const cellHeight = 40
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="row"
|
class="row"
|
||||||
|
on:focus
|
||||||
on:mouseover={() => ($hoveredRowId = row._id)}
|
on:mouseover={() => ($hoveredRowId = row._id)}
|
||||||
on:mouseleave={() => ($hoveredRowId = null)}
|
on:mouseleave={() => ($hoveredRowId = null)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -144,7 +144,11 @@
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#if $config.allowAddRows}
|
{#if $config.allowAddRows}
|
||||||
<div class="row new" on:mouseover={() => ($hoveredRowId = "new")}>
|
<div
|
||||||
|
class="row new"
|
||||||
|
on:focus
|
||||||
|
on:mouseover={() => ($hoveredRowId = "new")}
|
||||||
|
>
|
||||||
<SheetCell
|
<SheetCell
|
||||||
rowHovered={$hoveredRowId === "new"}
|
rowHovered={$hoveredRowId === "new"}
|
||||||
label
|
label
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const createRowsStore = context => {
|
||||||
|
|
||||||
// Local stores for managing fetching data
|
// Local stores for managing fetching data
|
||||||
const query = derived(filter, $filter => buildLuceneQuery($filter))
|
const query = derived(filter, $filter => buildLuceneQuery($filter))
|
||||||
const fetch = derived([tableId, filter], ([$tableId, $filter]) => {
|
const fetch = derived([tableId, query], ([$tableId, $query]) => {
|
||||||
if (!$tableId) {
|
if (!$tableId) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ export const createRowsStore = context => {
|
||||||
options: {
|
options: {
|
||||||
sortColumn: null,
|
sortColumn: null,
|
||||||
sortOrder: null,
|
sortOrder: null,
|
||||||
query: get(query),
|
query: $query,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
paginate: true,
|
paginate: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue