michellethomas commented on a change in pull request #6236: Dashboard filter 
box default
URL: 
https://github.com/apache/incubator-superset/pull/6236#discussion_r229537078
 
 

 ##########
 File path: superset/assets/src/visualizations/FilterBox/FilterBox.jsx
 ##########
 @@ -123,7 +123,7 @@ class FilterBox extends React.Component {
               label={t('Time range')}
               description={t('Select start and end date')}
               onChange={(...args) => { this.changeFilter(TIME_RANGE, ...args); 
}}
-              value={this.state.selectedValues[TIME_RANGE]}
+              value={this.state.selectedValues[TIME_RANGE] || 'No filter'}
 
 Review comment:
   'No filter' is one of the `COMMON_TIME_FRAMES` so it won't be parsed and 
split into since/until incorrectly. I'm a little worried about this not being 
robust (if the value changes then this will break), but I'm not sure we want to 
change the default value for the DateFilterControl to be 'No filter'. I added 
the test so if this gets changed it will break.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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