etr2460 commented on a change in pull request #8398: [SIP-15] Adding initial 
framework
URL: 
https://github.com/apache/incubator-superset/pull/8398#discussion_r339703984
 
 

 ##########
 File path: 
superset/assets/src/explore/components/controls/DateFilterControl.jsx
 ##########
 @@ -494,7 +497,8 @@ export default class DateFilterControl extends 
React.Component {
   }
   render() {
     let value = this.props.value || defaultProps.value;
-    value = value.split(SEPARATOR).map((v, idx) => v.replace('T00:00:00', '') 
|| (idx === 0 ? '-∞' : '∞')).join(SEPARATOR);
+    const endpoints = this.props.endpoints;
+    value = value.split(SEPARATOR).map((v, idx) => 
ISO_8601_REGEX_MATCH.test(v) ? v.replace('T00:00:00', '') + (endpoints ? ` 
(${endpoints[idx]})` : '') : v || (idx === 0 ? '-∞' : '∞')).join(SEPARATOR);
 
 Review comment:
   same note here about the ternary. some newlines might also make this more 
readable. 

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