Skip to content

Commit

Permalink
default hidden column in RT table
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter1975 committed Oct 16, 2023
1 parent 3ed3f9f commit 8baaf31
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { StoredTableConfig } from '../components';
import {
ProductBlockDefinition,
ProductDefinition,
ResourceTypeDefinition,
WorkflowDefinition,
} from '../types';

Expand Down Expand Up @@ -42,6 +43,12 @@ export const getDefaultTableConfig = <T>(storageKey: string) => {
];
return getTableConfig<T>(productBlockColumns as (keyof T)[]);

case METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY:
const resourceTypeColumns: (keyof ResourceTypeDefinition)[] = [
'resourceTypeId',
];
return getTableConfig<T>(resourceTypeColumns as (keyof T)[]);

case METADATA_PRODUCT_TABLE_LOCAL_STORAGE_KEY:
const productColumns: (keyof ProductDefinition)[] = [
'productId',
Expand Down Expand Up @@ -82,7 +89,6 @@ export const getDefaultTableConfig = <T>(storageKey: string) => {
'productName',
];
return getTableConfig<T>(subscriptionColumns as (keyof T)[]);
case METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY:
default:
return getTableConfig();
}
Expand Down

0 comments on commit 8baaf31

Please sign in to comment.