From f9785a69a22e0717881ceb432806495fd164ed85 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 Nov 2020 12:12:03 +0000 Subject: [PATCH 1/4] fix fast view switching bug --- .../builder/src/components/backend/DataTable/DataTable.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 9a5eaef83a..063ca34633 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -31,7 +31,7 @@ - {#if Object.keys(schema).length > 0} + {#if schema && Object.keys(schema).length > 0} From 9823243c11ef9a535909e5f26a7c6c0d2bb9093d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 Nov 2020 15:34:23 +0000 Subject: [PATCH 2/4] prevent one broken app from breaking your whole install --- packages/server/src/api/controllers/application.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index 512299c5c8..c4d55d631b 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -79,7 +79,8 @@ exports.fetch = async function(ctx) { if (apps.length === 0) { ctx.body = [] } else { - ctx.body = await Promise.all(apps) + const response = await Promise.allSettled(apps) + ctx.body = response.filter(result => result.status === "fulfilled") } } From bfab74d11f6bc6042e3fd769ef4eb9877d1a46a0 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 Nov 2020 16:17:09 +0000 Subject: [PATCH 3/4] make datagrid less janky --- packages/standard-components/package.json | 2 +- .../standard-components/src/DataGrid/Component.svelte | 10 +--------- packages/standard-components/src/index.js | 1 + 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index f3c7272490..3f5273cf9e 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -36,7 +36,7 @@ "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": { "@budibase/bbui": "^1.50.1", - "@budibase/svelte-ag-grid": "^0.0.13", + "@budibase/svelte-ag-grid": "^0.0.16", "@fortawesome/fontawesome-free": "^5.14.0", "@svelteschool/svelte-forms": "^0.7.0", "apexcharts": "^3.22.1", diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 0d80990513..fb8ce2ebc4 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -140,12 +140,6 @@ } - - - -
{#if dataLoaded} {#if canAddDelete} @@ -153,9 +147,7 @@ {#if selectedRows.length > 0} - Delete - {selectedRows.length} - row(s) + Delete {selectedRows.length} row(s) {/if}
diff --git a/packages/standard-components/src/index.js b/packages/standard-components/src/index.js index 98bdc28028..3dec13e27b 100644 --- a/packages/standard-components/src/index.js +++ b/packages/standard-components/src/index.js @@ -1,4 +1,5 @@ import "@budibase/bbui/dist/bbui.css" +import "flatpickr/dist/flatpickr.css" export { default as container } from "./Container.svelte" export { default as text } from "./Text.svelte" From cee26fb0b6a9835abae7e4daf719c9f028935bb5 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 Nov 2020 16:42:28 +0000 Subject: [PATCH 4/4] map fulfilled promises --- packages/server/src/api/controllers/application.js | 4 +++- packages/standard-components/src/DataGrid/Component.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index c4d55d631b..f05430e05a 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -80,7 +80,9 @@ exports.fetch = async function(ctx) { ctx.body = [] } else { const response = await Promise.allSettled(apps) - ctx.body = response.filter(result => result.status === "fulfilled") + ctx.body = response + .filter(result => result.status === "fulfilled") + .map(({ value }) => value) } } diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index fb8ce2ebc4..369d7bb2d2 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -147,7 +147,9 @@ {#if selectedRows.length > 0} - Delete {selectedRows.length} row(s) + Delete + {selectedRows.length} + row(s) {/if}