Create tests for columns configurator
[arvados-workbench2.git] / src / components / data-explorer / column.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 export interface Column<T> {
6     header: string;
7     selected: boolean;
8     configurable?: boolean;
9     render: (item: T) => React.ReactElement<void>;
10     renderHeader?: () => React.ReactElement<void>;
11 }
12
13 export const isColumnConfigurable = <T>(column: Column<T>) => {
14     return column.configurable === undefined || column.configurable === true;
15 };