pierrejeambrun commented on code in PR #67082:
URL: https://github.com/apache/airflow/pull/67082#discussion_r3282542093


##########
airflow-core/src/airflow/ui/src/components/FilterBar/FilterBar.tsx:
##########
@@ -38,6 +38,14 @@ const defaultInitialValues: Record<string, FilterValue> = {};
 const getFilterIcon = (config: FilterConfig): React.ReactNode =>
   config.icon ?? getDefaultFilterIcon(config.type);
 
+const areFilterValuesEqual = (left: FilterValue, right: FilterValue) => {

Review Comment:
   Nit: I think this works for most `FilterValue` shapes, but `JSON.stringify` 
is sensitive to key insertion order for objects like `DateRangeValue` — 
`{startDate, endDate}` and `{endDate, startDate}` stringify differently even 
when the values are equal. Probably not an issue in practice if the URL 
deserialization always builds the object the same way, but worth being aware 
of. The `try/catch` is also probably unnecessary since `FilterValue` can't 
really be circular.



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