vogievetsky commented on a change in pull request #7292: Add table column 
selection in druid console to allow hiding/showing of columns
URL: https://github.com/apache/incubator-druid/pull/7292#discussion_r267143824
 
 

 ##########
 File path: web-console/src/views/tasks-view.tsx
 ##########
 @@ -429,29 +458,33 @@ ORDER BY "rank" DESC, "created_time" DESC`);
             Header: "Task ID",
             accessor: "task_id",
             width: 300,
-            Aggregated: row => ''
+            Aggregated: row => '',
+            show: this.taskTableColumnSelectionHandler.showColumn("Task ID")
           },
           {
             Header: "Type",
             accessor: "type",
             Cell: row => {
               const value = row.value;
               return <a onClick={() => { this.setState({ taskFilter: 
addFilter(taskFilter, 'type', value) }); }}>{value}</a>;
-            }
+            },
+            show: this.taskTableColumnSelectionHandler.showColumn("Type")
           },
           {
             Header: "Datasource",
             accessor: "datasource",
             Cell: row => {
               const value = row.value;
               return <a onClick={() => { this.setState({ taskFilter: 
addFilter(taskFilter, 'datasource', value) }); }}>{value}</a>;
-            }
+            },
+            show: this.taskTableColumnSelectionHandler.showColumn("Datasource")
           },
           {
             Header: "Created time",
             accessor: "created_time",
             width: 120,
-            Aggregated: row => ''
+            Aggregated: row => '',
+            show: this.taskTableColumnSelectionHandler.showColumn("Created 
time")
 
 Review comment:
   Just one general comment: you are doing a lot of 
`this.blahTableColumnSelectionHandler` in the render functions, it would be 
nicer to do `const { blahTableColumnSelectionHandler } = this` at the start of 
the function and then not do all the dereferencing. It would be slightly more 
performant but also will be less code :-) save all the `this.`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to