X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e4aa2fd44835698c0a3e6f321a2cf88b6f11939..06a247fec429a11fb27c0ebf50ba9c31ffc8d0c2:/src/views-components/project-explorer/project-explorer.tsx

diff --git a/src/views-components/project-explorer/project-explorer.tsx b/src/views-components/project-explorer/project-explorer.tsx
index 3fac6df690..4931c09a51 100644
--- a/src/views-components/project-explorer/project-explorer.tsx
+++ b/src/views-components/project-explorer/project-explorer.tsx
@@ -27,10 +27,16 @@ interface ProjectExplorerProps {
 
 interface ProjectExplorerState {
     columns: Array<DataColumn<ProjectExplorerItem>>;
+    searchValue: string;
+    page: number;
+    rowsPerPage: number;
 }
 
 class ProjectExplorer extends React.Component<ProjectExplorerProps, ProjectExplorerState> {
     state: ProjectExplorerState = {
+        searchValue: "",
+        page: 0,
+        rowsPerPage: 10,
         columns: [{
             name: "Name",
             selected: true,
@@ -103,11 +109,17 @@ class ProjectExplorer extends React.Component<ProjectExplorerProps, ProjectExplo
             items={this.props.items}
             columns={this.state.columns}
             contextActions={this.contextMenuActions}
+            searchValue={this.state.searchValue}
+            page={this.state.page}
+            rowsPerPage={this.state.rowsPerPage}
             onColumnToggle={this.toggleColumn}
             onFiltersChange={this.changeFilters}
             onRowClick={console.log}
             onSortToggle={this.toggleSort}
-            onContextAction={this.executeAction} />;
+            onSearch={this.search}
+            onContextAction={this.executeAction}
+            onChangePage={this.changePage}
+            onChangeRowsPerPage={this.changeRowsPerPage} />;
     }
 
     toggleColumn = (toggledColumn: DataColumn<ProjectExplorerItem>) => {
@@ -143,6 +155,18 @@ class ProjectExplorer extends React.Component<ProjectExplorerProps, ProjectExplo
     executeAction = (action: ContextMenuAction, item: ProjectExplorerItem) => {
         alert(`Executing ${action.name} on ${item.name}`);
     }
+
+    search = (searchValue: string) => {
+        this.setState({ searchValue });
+    }
+
+    changePage = (page: number) => {
+        this.setState({ page });
+    }
+
+    changeRowsPerPage = (rowsPerPage: number) => {
+        this.setState({ rowsPerPage });
+    }
 }
 
 const renderName = (item: ProjectExplorerItem) =>
