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/11 07:06:25 UTC

[GitHub] [incubator-superset] graceguo-supercat opened a new pull request #8949: [filter_box] Fix ; separated filter_box default values

graceguo-supercat opened a new pull request #8949: [filter_box] Fix ; separated filter_box default values
URL: https://github.com/apache/incubator-superset/pull/8949
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   

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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
graceguo-supercat 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_r365968772
 
 

 ##########
 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:
   Yeah, this is how filter_box component handle initial values:
   https://github.com/apache/incubator-superset/blob/a96eae46af852ba22ba1f2427333bc7d03ebd6c1/superset/assets/src/visualizations/FilterBox/FilterBox.jsx#L241
   
   from the above line, i feel array is preferred type.

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


[GitHub] [incubator-superset] graceguo-supercat merged pull request #8949: [filter_box] Fix ; separated filter_box default values

Posted by GitBox <gi...@apache.org>.
graceguo-supercat merged pull request #8949: [filter_box] Fix ; separated filter_box default values
URL: https://github.com/apache/incubator-superset/pull/8949
 
 
   

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