eschutho commented on code in PR #33242:
URL: https://github.com/apache/superset/pull/33242#discussion_r2062000135
##########
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx:
##########
@@ -277,78 +278,7 @@ export default function DateFilterLabel(props:
DateFilterControlProps) {
}
const overlayContent = (
- <ContentStyleWrapper>
- <div className="control-label">{t('RANGE TYPE')}</div>
- <StyledRangeType
- ariaLabel={t('RANGE TYPE')}
- options={FRAME_OPTIONS}
- value={frame}
- onChange={onChangeFrame}
- />
- {frame !== 'No filter' && <Divider />}
- {frame === 'Common' && (
- <CommonFrame value={timeRangeValue} onChange={setTimeRangeValue} />
- )}
- {frame === 'Calendar' && (
- <CalendarFrame value={timeRangeValue} onChange={setTimeRangeValue} />
- )}
- {frame === 'Current' && (
- <CurrentCalendarFrame
- value={timeRangeValue}
- onChange={setTimeRangeValue}
- />
- )}
- {frame === 'Advanced' && (
- <AdvancedFrame value={timeRangeValue} onChange={setTimeRangeValue} />
- )}
- {frame === 'Custom' && (
- <CustomFrame
- value={timeRangeValue}
- onChange={setTimeRangeValue}
- isOverflowingFilterBar={isOverflowingFilterBar}
- />
- )}
- {frame === 'No filter' && <div data-test={DateFilterTestKey.NoFilter} />}
- <Divider />
- <div>
- <div className="section-title">{t('Actual time range')}</div>
- {validTimeRange && (
- <div>
- {evalResponse === 'No filter' ? t('No filter') : evalResponse}
- </div>
- )}
- {!validTimeRange && (
- <IconWrapper className="warning">
- <Icons.ExclamationCircleOutlined
- iconColor={theme.colors.error.base}
- />
- <span className="text error">{evalResponse}</span>
- </IconWrapper>
- )}
- </div>
- <Divider />
- <div className="footer">
- <Button
- buttonStyle="secondary"
- cta
- key="cancel"
- onClick={onHide}
- data-test={DateFilterTestKey.CancelButton}
- >
- {t('CANCEL')}
- </Button>
- <Button
- buttonStyle="primary"
- cta
- disabled={!validTimeRange}
- key="apply"
- onClick={onSave}
- data-test={DateFilterTestKey.ApplyButton}
- >
- {t('APPLY')}
- </Button>
- </div>
- </ContentStyleWrapper>
+ <DateFilter onApply={e => console.log(e)} onCancel={onHide} />
Review Comment:
Nit-console
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]