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 2021/01/27 17:41:30 UTC

[GitHub] [superset] villebro commented on a change in pull request #12793: fix(explore): time picker can not be switched between now and specific

villebro commented on a change in pull request #12793:
URL: https://github.com/apache/superset/pull/12793#discussion_r565505979



##########
File path: superset-frontend/src/explore/components/controls/DateFilterControl/utils.ts
##########
@@ -183,31 +197,27 @@ export const customTimeRangeEncode = (customRange: CustomRangeType): string => {
   } = { ...customRange };
   // specific : specific
   if (SPECIFIC_MODE.includes(sinceMode) && SPECIFIC_MODE.includes(untilMode)) {
-    const since = sinceMode === 'specific' ? sinceDatetime : sinceMode;
-    const until = untilMode === 'specific' ? untilDatetime : untilMode;
+    const since = sinceMode === 'specific' ? dttmToString(sinceDatetime) : sinceMode; // eslint-disable-line

Review comment:
       I guess this comes down to personal preference (these lines are easier to read as one-liners, but the linter wants to break them up). I've personally come to appreciate uniformity over legibility. I'd vote for removing the `eslint-disable-line`s here and fixing the linting errors.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org