projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small refactor
[arvados-workbench2.git]
/
src
/
components
/
data-explorer
/
data-explorer.tsx
diff --git
a/src/components/data-explorer/data-explorer.tsx
b/src/components/data-explorer/data-explorer.tsx
index 681caa9478c15d194c0ab1f904a59369b015089a..af14db9c9e08818f3a9dc945718d1296f707d5e8 100644
(file)
--- a/
src/components/data-explorer/data-explorer.tsx
+++ b/
src/components/data-explorer/data-explorer.tsx
@@
-51,6
+51,7
@@
interface DataExplorerDataProps<T> {
}
interface DataExplorerActionProps<T> {
}
interface DataExplorerActionProps<T> {
+ onSetColumns: (columns: DataColumns<T>) => void;
onSearch: (value: string) => void;
onRowClick: (item: T) => void;
onRowDoubleClick: (item: T) => void;
onSearch: (value: string) => void;
onRowClick: (item: T) => void;
onRowDoubleClick: (item: T) => void;
@@
-67,6
+68,11
@@
type DataExplorerProps<T> = DataExplorerDataProps<T> & DataExplorerActionProps<T
export const DataExplorer = withStyles(styles)(
class DataExplorerGeneric<T> extends React.Component<DataExplorerProps<T>> {
export const DataExplorer = withStyles(styles)(
class DataExplorerGeneric<T> extends React.Component<DataExplorerProps<T>> {
+ componentDidMount() {
+ if (this.props.onSetColumns) {
+ this.props.onSetColumns(this.props.columns);
+ }
+ }
render() {
const {
columns, onContextMenu, onFiltersChange, onSortToggle, extractKey,
render() {
const {
columns, onContextMenu, onFiltersChange, onSortToggle, extractKey,