zhaoyongjie commented on a change in pull request #12609:
URL: https://github.com/apache/superset/pull/12609#discussion_r564176880



##########
File path: 
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx
##########
@@ -219,6 +221,14 @@ export default function DateFilterControl(props: 
DateFilterLabelProps) {
     });
   }, [value]);
 
+  useEffect(() => {
+    if (isMounted) {
+      onChange('Last week');
+      setTimeRangeValue('Last week');
+      setFrame(guessFrame('Last week'));

Review comment:
       These two lines can be removed. Because when the `value` 
changed(onChange('last week')) then the component can reload.

##########
File path: 
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx
##########
@@ -219,6 +221,14 @@ export default function DateFilterControl(props: 
DateFilterLabelProps) {
     });
   }, [value]);
 
+  useEffect(() => {
+    if (isMounted) {
+      onChange('Last week');
+      setTimeRangeValue('Last week');
+      setFrame(guessFrame('Last week'));

Review comment:
       Sorry. Ignore me. Shouldn't be removed. merged.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to