@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/package.json CHANGED
@@ -108,5 +108,5 @@
108
108
  "type": "module",
109
109
  "types": "dist/index.d.ts",
110
110
  "typings": "dist/index.d.ts",
111
- "version": "1.5.363"
111
+ "version": "1.5.364"
112
112
  }
@@ -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); // Stato per la UI
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
- // @ts-ignore
177
- ActionsComponent={ActionsComponent}
178
- nextIconButtonProps={{
179
- disabled: !hasNextPage
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.source ?? (typeof child.props.label === 'string' ? child.props.label : undefined);
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