[material-ui][Pagination] getItemAriaLabel called with null page number contrary to type definition #43385
Labels
component: pagination
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
package: material-ui
Specific to @mui/material
typescript
Steps to reproduce
Link to live example: https://codesandbox.io/p/devbox/88qvg2?file=%2Fsrc%2FDemo.tsx
Steps:
getItemAriaLabel
page
args that are passed in on the initial render ofPagination
Current behavior
Hello 👋
It looks like the
getItemAriaLabel
prop onPagination
is typed as:with the non-null
###page
param, butnull
seems to be coming through on initial render ofPagination
(see demo):Expected behavior
Would it be possible to either change the behavior of passing
null
in forpage
or else change the typing ofgetItemAriaLabel
to make it clear thatnull
is an option forpage
?Context
We are trying to use strict null safety
Your environment
See https://codesandbox.io/p/devbox/88qvg2?file=%2Fsrc%2FDemo.tsx
Thank you!
Search keywords: getItemAriaLabel page null
The text was updated successfully, but these errors were encountered: