Making save and load props optional

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-05-23 15:08:49 +03:00
1 parent 0af884632e
commit 3162f5e669
2 files changed
+3 -3

No files matched your search

@@ -312,7 +312,7 @@ class NonInjectedItemListLayoutContent<
const selectedItems = store.pickOnlySelected(items);
if (table) {
return <table.Component tableId={tableId} columns={this.context.columns} save={() => null} load={() => noop} />
return <table.Component tableId={tableId} columns={this.context.columns} />
}
return (
+2 -2
View File
@@ -16,8 +16,8 @@ type Column = (
export interface TableComponentProps {
tableId?: string;
columns?: Column[];
save: (state: object) => void;
load: (tableId: string) => object;
save?: (state: object) => void;
load?: (tableId: string) => object;
}
export interface TableDataContextValue {