From 49f22e1a3baad2887c7dfc924fd68a95e8200d34 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sat, 6 Mar 2021 18:50:58 +0100 Subject: [PATCH] save commands --- packages/datalib/src/ChangeSet.ts | 1 + packages/web/src/datagrid/DataGridCore.svelte | 43 +++++++++++++++++-- packages/web/src/utility/memberStore.ts | 19 ++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 packages/web/src/utility/memberStore.ts diff --git a/packages/datalib/src/ChangeSet.ts b/packages/datalib/src/ChangeSet.ts index 27384475..37d8c675 100644 --- a/packages/datalib/src/ChangeSet.ts +++ b/packages/datalib/src/ChangeSet.ts @@ -347,5 +347,6 @@ export function changeSetInsertNewRow(changeSet: ChangeSet, name?: NamedObjectIn } export function changeSetContainsChanges(changeSet: ChangeSet) { + if (!changeSet) return false; return changeSet.deletes.length > 0 || changeSet.updates.length > 0 || changeSet.inserts.length > 0; } diff --git a/packages/web/src/datagrid/DataGridCore.svelte b/packages/web/src/datagrid/DataGridCore.svelte index 6cb4a0b9..0f147a4b 100644 --- a/packages/web/src/datagrid/DataGridCore.svelte +++ b/packages/web/src/datagrid/DataGridCore.svelte @@ -1,6 +1,8 @@