-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TablePaginationUnstyled] Define ownerState and slot props' types #32905
[TablePaginationUnstyled] Define ownerState and slot props' types #32905
Conversation
}, | ||
"name": null | ||
}, | ||
"styles": { "classes": [], "globalClasses": {}, "name": null }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to find a new way of how to document the global classes for the unstyled components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since the unstyled components don't have the classes
prop, we'll have to figure out something else. Perhaps the solution will appear when we allow customizing/disabling the default classes.
return <div data-rows-per-page={ownerState.rowsPerPage} {...other} />; | ||
} | ||
|
||
function Button(props: TablePaginationActionsUnstyledButtonSlotProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a long name 😅
<NextButton | ||
onClick={handleNextButtonClick} | ||
disabled={count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false} | ||
color="inherit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops nice catch :)
Defined types for TablePaginationUnstyledownerState and its slots.
Also renamed types and files according to #31415