Andrushika commented on code in PR #72558:
URL: https://github.com/apache/airflow/pull/72558#discussion_r3940347567
##########
airflow-core/src/airflow/ui/src/components/DataTable/searchParams.ts:
##########
@@ -29,6 +29,14 @@ const {
SORT: SORT_PARAM,
}: SearchParamsKeysType = SearchParamsKeys;
+const isSameSorting = (sorting: SortingState, defaultSorting: SortingState |
undefined) =>
+ defaultSorting?.length === sorting.length &&
+ sorting.every((sort, index) => {
+ const defaultSort = defaultSorting[index];
+
+ return defaultSort?.id === sort.id && defaultSort.desc === sort.desc;
+ });
+
Review Comment:
This keeps the existing behavior on main: when the sort equals the one
remembered in localStorage, the `sort` param is dropped from the URL. I think
the query param should always sync with the sort that is actually applied, so a
shared link shows the same order. If reviewers agree, I would like to change
that in a follow-up PR.
--
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]