@applica-software-guru/react-admin 1.5.363 → 1.5.364
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/ra-lists/Datagrid/DatagridHeader.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +7 -3
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Pagination/Pagination.tsx +8 -5
- package/src/components/ra-lists/Datagrid/DatagridHeader.tsx +3 -1
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ const Pagination: FC<PaginationProps> = memo((props) => {
|
|
|
18
18
|
const { isLoading, hasNextPage, page, perPage, total, setPage, setPerPage } = useListPaginationContext(props);
|
|
19
19
|
const translate = useTranslate();
|
|
20
20
|
const isSmall = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'));
|
|
21
|
-
const [currentPage, setCurrentPage] = useState(page - 1);
|
|
21
|
+
const [currentPage, setCurrentPage] = useState(page - 1);
|
|
22
22
|
const { hasCreate } = useResourceDefinition(props);
|
|
23
23
|
const [isSelectedPage, setIsSelectedPage] = useState(false);
|
|
24
24
|
const theme = useTheme();
|
|
@@ -173,10 +173,13 @@ const Pagination: FC<PaginationProps> = memo((props) => {
|
|
|
173
173
|
page={currentPage}
|
|
174
174
|
onPageChange={handlePageChange}
|
|
175
175
|
onRowsPerPageChange={handlePerPageChange}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
ActionsComponent={ActionsComponent as any}
|
|
177
|
+
slotProps={{
|
|
178
|
+
actions: {
|
|
179
|
+
nextButton: {
|
|
180
|
+
disabled: !hasNextPage
|
|
181
|
+
}
|
|
182
|
+
}
|
|
180
183
|
}}
|
|
181
184
|
component="span"
|
|
182
185
|
labelRowsPerPage={translate('ra.navigation.page_rows_per_page')}
|
|
@@ -134,7 +134,9 @@ function DatagridHeader(props: MultiSortDatagridHeaderProps): ReactElement {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
const source =
|
|
137
|
-
child.props.
|
|
137
|
+
child.props.sortBy ??
|
|
138
|
+
child.props.source ??
|
|
139
|
+
(typeof child.props.label === 'string' ? child.props.label : undefined);
|
|
138
140
|
const sortable = child.props.sortable !== false && !!source;
|
|
139
141
|
const sortInfo = sortable ? getSortForField(source) : null;
|
|
140
142
|
|