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 ListActions = props => {
const { className, exporter, filters, maxResults, ...rest } = props; const { className, exporter, filters, maxResults, ...rest } = props;
const { const { sort, resource, displayedFilters, filterValues, showFilter, total } =
currentSort, useListContext();
resource,
displayedFilters,
filterValues,
showFilter,
total,
} = useListContext();
return ( return (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}> <TopToolbar className={className} {...sanitizeListRestProps(rest)}>
{filters && {filters &&
@ -39,7 +33,7 @@ const ListActions = props => {
<ExportButton <ExportButton
disabled={total === 0} disabled={total === 0}
resource={resource} resource={resource}
sort={currentSort} sort={sort}
filterValues={filterValues} filterValues={filterValues}
maxResults={maxResults} maxResults={maxResults}
/> />

View File

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