bbovenzi commented on code in PR #69955:
URL: https://github.com/apache/airflow/pull/69955#discussion_r3596277051


##########
airflow-core/src/airflow/ui/src/hooks/useDateRangeFilter.ts:
##########
@@ -318,6 +304,29 @@ export const useDateRangeFilter = ({ onChange, translate, 
value }: UseDateRangeF
 
   const hasValidationErrors = editingState.validationErrors.length > 0;
 
+  const applyDateRange = useCallback(() => {

Review Comment:
   This useCallback isn't necessary. Please remove.



##########
airflow-core/src/airflow/ui/src/components/FilterBar/filters/DateRangeInputs.tsx:
##########
@@ -186,6 +198,20 @@ export const DateRangeInputs = ({
           {getFieldError("range")?.message}
         </Text>
       )}
+
+      {onApply && (
+        <Button
+          borderRadius="md"
+          colorPalette="blue"
+          disabled={editingState.validationErrors.length > 0}
+          mt={1}
+          onClick={onApply}
+          size="sm"
+          width="full"
+        >
+          Apply
+        </Button>
+      )}

Review Comment:
   Is this button necessary? Hitting "Enter/return" or clicking outside the 
popover should submit the date range. We don't have this in our other filter 
bar inputs. If it does help, then it should also close the popover.
   
   Anyways there are two other issues here:
   1. colorPalette should be "brand" as in other buttons we have
   2. Apply needs to have a translation key. Ideally using one we already have. 
I am sure "Submit" already exists
   
   



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

Reply via email to