chore: fix types for pagination navigation#10263
Conversation
|
Preview: https://patternfly-react-pr-10263.surge.sh A11y report: https://patternfly-react-pr-10263-a11y.surge.sh |
Signed-off-by: Jon Koops <jonkoops@gmail.com>
1a15d04 to
4d23aa0
Compare
| onNextClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void; | ||
| /** Function called when user inputs page number. */ | ||
| onPageInput?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void; | ||
| onPageInput?: (event: React.KeyboardEvent<HTMLInputElement>, page: number) => void; |
There was a problem hiding this comment.
This is a breaking change to the type of a public API, but the type that was here before was incorrect.
mfrances17
left a comment
There was a problem hiding this comment.
LGTM 👍 Would want someone from patternfly-react team to make the call on whether this needs to go into PF6 due to breaking change, although if it was wrong that might qualify it to get into PF5 anyway.
Discussed this with @tlabaj and we can land this under v5 since it's only a type-correctness fix. |
| ofWord?: string; | ||
| /** The number of the current page. */ | ||
| page: string | number; | ||
| page: number; |
There was a problem hiding this comment.
lgtm overall but cc @tlabaj to double check that this prop change isn't also a breaking change (while onPageInput was a type fix).
There was a problem hiding this comment.
This interface is never exported as a public API, so this will not be a breaking change.
Refactors the types of the pagination navigation so that they will compile when upgrading to TypeScript 5. This is needed to land #10156.