mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[sip-15] Displaying endpoints for all start/end time ranges (#8817)
* [sip-15] Displaying endpoints for all start/end time ranges * Update superset/assets/src/explore/components/controls/DateFilterControl.jsx Co-Authored-By: Erik Ritter <erik.ritter@airbnb.com> * Update superset/assets/src/explore/components/controls/DateFilterControl.jsx Co-Authored-By: Erik Ritter <erik.ritter@airbnb.com> * Update DateFilterControl.jsx Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
This commit is contained in:
@@ -576,11 +576,10 @@ export default class DateFilterControl extends React.Component {
|
||||
const endpoints = this.props.endpoints;
|
||||
value = value
|
||||
.split(SEPARATOR)
|
||||
.map((v, idx) =>
|
||||
moment(v).isValid()
|
||||
? v.replace('T00:00:00', '') +
|
||||
(endpoints ? ` (${endpoints[idx]})` : '')
|
||||
: v || (idx === 0 ? '-∞' : '∞'),
|
||||
.map(
|
||||
(v, idx, values) =>
|
||||
(v.replace('T00:00:00', '') || (idx === 0 ? '-∞' : '∞')) +
|
||||
(endpoints && values.length > 1 ? ` (${endpoints[idx]})` : ''),
|
||||
)
|
||||
.join(SEPARATOR);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user