You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/13 18:20:00 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #8949: [filter_box] Fix ; separated filter_box default values

etr2460 commented on a change in pull request #8949: [filter_box] Fix ; separated filter_box default values
URL: https://github.com/apache/incubator-superset/pull/8949#discussion_r365954115
 
 

 ##########
 File path: superset/assets/src/dashboard/util/getFilterConfigsFromFormdata.js
 ##########
 @@ -31,9 +31,15 @@ export default function getFilterConfigsFromFormdata(form_data = {}) {
   } = form_data;
   let configs = filter_configs.reduce(
     ({ columns, labels }, config) => {
+      let defaultValues = config.defaultValue;
+      // defaultValue could be ; separated values,
+      // could be null or ''
+      if (config.defaultValue) {
+        defaultValues = config.defaultValue.split(';');
 
 Review comment:
   defaultValues is now always an array, even if there's only one element in it. is that an issue?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org