Rename currentSort to sort

https: //marmelab.com/react-admin/Upgrade.html#currentsort-renamed-to-sort

Change-Id: I676adefe0073a9a0343dcd598e9559ecf30c38af
This commit is contained in:
dklimpel 2024-02-05 21:57:14 +01:00 committed by Manuel Stahl
parent 1eb787fd9b
commit 155e73b9c6
2 changed files with 5 additions and 11 deletions

View file

@ -17,14 +17,8 @@ import { DeleteMediaButton } from "./media";
const ListActions = props => {
const { className, exporter, filters, maxResults, ...rest } = props;
const {
currentSort,
resource,
displayedFilters,
filterValues,
showFilter,
total,
} = useListContext();
const { sort, resource, displayedFilters, filterValues, showFilter, total } =
useListContext();
return (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
{filters &&
@ -39,7 +33,7 @@ const ListActions = props => {
<ExportButton
disabled={total === 0}
resource={resource}
sort={currentSort}
sort={sort}
filterValues={filterValues}
maxResults={maxResults}
/>

View file

@ -73,7 +73,7 @@ const date_format = {
};
const UserListActions = ({
currentSort,
sort,
className,
resource,
filters,
@ -103,7 +103,7 @@ const UserListActions = ({
<ExportButton
disabled={total === 0}
resource={resource}
sort={currentSort}
sort={sort}
filter={{ ...filterValues, ...permanentFilter }}
exporter={exporter}
maxResults={maxResults}