[ARVADOS-WORKBENCH2] updated: 1.1.4-171-ge00f9cc
Git user
git at public.curoverse.com
Sun Jul 1 16:38:30 EDT 2018
Summary of changes:
src/components/data-explorer/data-explorer.tsx | 8 +++-----
src/store/data-explorer/data-explorer-action.ts | 23 ++++++++---------------
2 files changed, 11 insertions(+), 20 deletions(-)
via e00f9cc69e8e98679c4cb310ff1399c4f1abff71 (commit)
from d42292e596bd6fa2185e15a09790521a93e26a64 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e00f9cc69e8e98679c4cb310ff1399c4f1abff71
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Sun Jul 1 22:38:12 2018 +0200
Clean up the code according to code review
Feature #13678
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index de9cb45..ff51c71 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -63,9 +63,7 @@ class DataExplorer<T> extends React.Component<DataExplorerProps<T> & WithStyles<
</Grid>
</Toolbar>
<DataTable
- columns={[
- ...this.props.columns,
- this.contextMenuColumn]}
+ columns={[...this.props.columns, this.contextMenuColumn]}
items={this.props.items}
onRowClick={(_, item: T) => this.props.onRowClick(item)}
onRowContextMenu={this.openContextMenu}
@@ -121,12 +119,12 @@ class DataExplorer<T> extends React.Component<DataExplorerProps<T> & WithStyles<
renderContextMenuTrigger = (item: T) =>
<Grid container justify="flex-end">
- <IconButton onClick={event => this.openContextMenuWithTrigger(event, item)}>
+ <IconButton onClick={event => this.openContextMenuTrigger(event, item)}>
<MoreVertIcon />
</IconButton>
</Grid>
- openContextMenuWithTrigger = (event: React.MouseEvent<HTMLElement>, item: T) => {
+ openContextMenuTrigger = (event: React.MouseEvent<HTMLElement>, item: T) => {
event.preventDefault();
this.setState({
contextMenu: {
diff --git a/src/store/data-explorer/data-explorer-action.ts b/src/store/data-explorer/data-explorer-action.ts
index c4ff614..fd3a7af 100644
--- a/src/store/data-explorer/data-explorer-action.ts
+++ b/src/store/data-explorer/data-explorer-action.ts
@@ -3,27 +3,20 @@
// SPDX-License-Identifier: AGPL-3.0
import { default as unionize, ofType, UnionOf } from "unionize";
-import { SortDirection, DataColumn } from "../../components/data-table/data-column";
import { DataTableFilterItem } from "../../components/data-table-filters/data-table-filters";
import { DataColumns } from "../../components/data-table/data-table";
-type WithId<T> = T & { id: string };
-
const actions = unionize({
- SET_COLUMNS: ofType<WithId<{ columns: DataColumns<any> }>>(),
- SET_FILTERS: ofType<WithId<{columnName: string, filters: DataTableFilterItem[]}>>(),
- SET_ITEMS: ofType<WithId<{items: any[]}>>(),
- SET_PAGE: ofType<WithId<{page: number}>>(),
- SET_ROWS_PER_PAGE: ofType<WithId<{rowsPerPage: number}>>(),
- TOGGLE_COLUMN: ofType<WithId<{ columnName: string }>>(),
- TOGGLE_SORT: ofType<WithId<{ columnName: string }>>(),
- SET_SEARCH_VALUE: ofType<WithId<{searchValue: string}>>()
+ SET_COLUMNS: ofType<{id: string, columns: DataColumns<any> }>(),
+ SET_FILTERS: ofType<{id: string,columnName: string, filters: DataTableFilterItem[]}>(),
+ SET_ITEMS: ofType<{id: string,items: any[]}>(),
+ SET_PAGE: ofType<{id: string,page: number}>(),
+ SET_ROWS_PER_PAGE: ofType<{id: string,rowsPerPage: number}>(),
+ TOGGLE_COLUMN: ofType<{id: string, columnName: string }>(),
+ TOGGLE_SORT: ofType<{id: string, columnName: string }>(),
+ SET_SEARCH_VALUE: ofType<{id: string,searchValue: string}>()
}, { tag: "type", value: "payload" });
export type DataExplorerAction = UnionOf<typeof actions>;
export default actions;
-
-
-
-
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list