williaster commented on a change in pull request #9593:
URL: 
https://github.com/apache/incubator-superset/pull/9593#discussion_r411573000



##########
File path: superset-frontend/src/dashboard/util/getFilterConfigsFromFormdata.js
##########
@@ -20,89 +20,85 @@
 import { TIME_FILTER_MAP } from '../../visualizations/FilterBox/FilterBox';
 import { TIME_FILTER_LABELS } from '../../explore/constants';
 
-export default function getFilterConfigsFromFormdata(form_data = {}) {
+/**
+ * Parse filters for Table chart. All non-metric columns are considered
+ * filterable values.
+ */
+function getFilterConfigsFromTableChart(form_data = {}) {
+  const { groupby = [], all_columns = [] } = form_data;
+  const configs = { columns: {}, labels: {} };
+  // `groupby` is from GROUP BY mode (aggregations)
+  // `all_columns` is from NOT GROUP BY mode (raw records)
+  const columns = groupby.concat(all_columns);
+  columns.forEach(column => {
+    configs.columns[column] = undefined;

Review comment:
       would `null` be better here? seems like that might match the filterbox 
empty value? to me that's more an explicit "undefined" versus `undefined`




----------------------------------------------------------------
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]



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

Reply via email to