-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(pagination): add pageSizeInputDisabled prop to Pagination #6070
fix(pagination): add pageSizeInputDisabled prop to Pagination #6070
Conversation
Deploy preview for carbon-elements ready! Built with commit b75639c |
Deploy preview for carbon-components-react ready! Built with commit b75639c https://deploy-preview-6070--carbon-components-react.netlify.app |
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.
Looks good to me 👍
e2a4f5d
to
ea60faa
Compare
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.
the prop name in the knobs section is the same as the other input knob
Looks great after Andrew's suggestions above! |
8839eed
to
323a548
Compare
@emyarod good catch, updated 👍 |
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.
are there instances where each input is disabled separately from the others or should the logic be combined for certain component states?
I'm not sure of the total use cases when the pagination is disabled, so I didn't want to combine any of the disabling in case they are used in different scenarios. I think eventually we may want to go that route, but might be best to wait until v11 and have them all use the disabled attribute? |
just looking for clarification on the component usage before adding the extra prop, since if it is supposed to just be linked with the regular |
bump @tw15egan if you have a sec to respond to the last comment 👀 |
I don't have any insight into that, but if you think we should just tie the disabled states together I'm fine with that 👍 |
yeah, similar to #6112 (comment) I think if the disabled states are meant to be linked then it makes sense not to expand the API surface area |
0e1422f
to
95c351b
Compare
@emyarod @joshblack @aagonzales I updated this PR to tie all inputs to the |
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.
Cool, yeah I'm not sure how people are using the disabled features with pagination. But one way to find out is to change this and see if anyone complains. I think it should be fine though I can't really image why some might be disabled but not others. Seems like products would use this disabled feature mostly for when there isn't any page to paginate to.
@aagonzales agreed, I reached out to the original issue creator and they agreed with that assumption as well |
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.
looks good to me
Following this change, it seems like it's now impossible to use |
Closes #6055
This PR now ties all
Pagination
inputs / buttons to thedisabled
prop, rather than having 3 separate props ton control them individually. This also deprecates thepageInputDisabled
prop.Changelog
Changed
disabled
prop now controls bothselect
elements, as well as theback
andforward
buttons.pageInputDisabled
prop now will throw depraction warningsTesting / Reviewing
Go to
Pagination
, enable thedisabled
prop, and make sure all inputs are disabled