mig-schema-table 3.0.116 → 3.0.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,7 @@ export interface ISchemaTableProps<T> {
|
|
|
43
43
|
rowHeight?: number;
|
|
44
44
|
schema: oas31.SchemaObject;
|
|
45
45
|
searchPlaceholder?: string;
|
|
46
|
-
settingsStorageKey
|
|
46
|
+
settingsStorageKey?: string;
|
|
47
47
|
style?: React.CSSProperties;
|
|
48
48
|
translate?: (key: string, ...args: Array<string | number>) => string;
|
|
49
49
|
useFilterStateHash?: boolean;
|
|
@@ -654,6 +654,9 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, custo
|
|
|
654
654
|
setColumnWidths(newColumnWidths);
|
|
655
655
|
}, [settingsStorageKey]);
|
|
656
656
|
const onClearSettingsButtonClick = React.useCallback(() => {
|
|
657
|
+
if (!settingsStorageKey) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
657
660
|
localStorage.removeItem(settingsStorageKey);
|
|
658
661
|
setColumnWidths(undefined);
|
|
659
662
|
}, [settingsStorageKey]);
|