anmolxlight commented on code in PR #69955:
URL: https://github.com/apache/airflow/pull/69955#discussion_r3597993839
##########
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:
Removed useCallback wrapper and import — React compiler handles memoization
automatically per AGENTS.md.
##########
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:
Removed the Apply button and onApply prop entirely. Popover onOpenChange
already calls applyDateRange() on close — Enter/blur submit through popover
dismissal.
--
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]