From 1bffa76194aa4d8e9c8298f3dc5a409bdbb5f35f Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Thu, 15 Oct 2020 16:15:28 +0200 Subject: [PATCH 1/2] removes add row button on grid component --- .../src/DataGrid/Component.svelte | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 0d86808961..e4acdbd2ea 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -11,7 +11,6 @@ import { onMount } from "svelte" import AgGrid from "@budibase/svelte-ag-grid" - import CreateRowButton from "./CreateRow/Button.svelte" import { TextButton as DeleteButton, Icon, Modal, ModalContent } from "@budibase/bbui" export let _bb @@ -79,13 +78,6 @@ } }) - const isEditable = type => - type !== "boolean" && - type !== "options" && - // type !== "datetime" && - type !== "link" && - type !== "attachment" - const shouldHideField = name => { if (name.startsWith("_")) return true // always 'row' @@ -96,10 +88,6 @@ return false } - const handleNewRow = async () => { - data = await fetchData(datasource) - } - const handleUpdate = ({ detail }) => { data[detail.row] = detail.data updateRow(detail.data) @@ -133,7 +121,6 @@ {#if dataLoaded} {#if canAddDelete}
- {#if selectedRows.length > 0} From ee4e1718d5c4eadfdfbc3ececed77f7ad4020766 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Thu, 15 Oct 2020 16:24:03 +0200 Subject: [PATCH 2/2] fixes jumpy behaviour when selecting rows --- packages/standard-components/src/DataGrid/Component.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index e4acdbd2ea..d2743cecea 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -148,6 +148,7 @@