Skip to content
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): mark selected option in page-sizes-select component #10884

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

m4olivei
Copy link
Contributor

@m4olivei m4olivei commented Aug 25, 2023

Related Ticket(s)

Closes #10553
https://jsw.ibm.com/browse/ADCMS-3821

Description

Fixes a bug where the initial value of the page-size attribute on the <bx-pagination> component previously did not set the correct <option> element within the <bx-page-sizes-select> component.

Changelog

Changed

  • Updated the slotchange handler for the <bx-page-sizes-select> component to set the selected attribute when applicable.

Testing Instructions

  • Navigate to Pagination > Default story
  • Enter a different value for "Number of rows per page (page-size)", using one of the other values in the dropdown, eg. 20 or 30
  • Click the "Open canvas in new tab" button, this will initiate the story with the set value for page-size to test the bug
  • Should see the value you set for the items per page drop down.

@m4olivei m4olivei requested a review from a team as a code owner August 25, 2023 18:24
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Aug 25, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Aug 25, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Aug 25, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Aug 25, 2023

Copy link
Member

@emyarod emyarod left a 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!

@m4olivei m4olivei added the Ready to merge Label for the pull requests that are ready to merge label Aug 31, 2023
@m4olivei
Copy link
Contributor Author

Thanks @emyarod ! I've labeled as Ready to merge and updated with the main branch.

@kodiakhq kodiakhq bot merged commit ec3e4cf into carbon-design-system:main Aug 31, 2023
@m4olivei m4olivei deleted the fix/pagination-story-v1 branch August 31, 2023 14:54
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Dec 4, 2023
…arbon-design-system#10884)

### Related Ticket(s)

Closes carbon-design-system#10553
https://jsw.ibm.com/browse/ADCMS-3821

### Description

Fixes a bug where the initial value of the `page-size` attribute on the `<bx-pagination>` component previously did not set the correct `<option>` element within the `<bx-page-sizes-select>` component.

### Changelog

**Changed**

- Updated the `slotchange` handler for the `<bx-page-sizes-select>` component to set the `selected` attribute when applicable.

### Testing Instructions

* Navigate to Pagination > Default story
* Enter a different value for "Number of rows per page (page-size)", using one of the other values in the dropdown, eg. 20 or 30
* Click the "Open canvas in new tab" button, this will initiate the story with the set value for `page-size` to test the bug
* Should see the value you set for the items per page drop down.
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Jun 11, 2024
…arbon-design-system#10884)

### Related Ticket(s)

Closes carbon-design-system#10553
https://jsw.ibm.com/browse/ADCMS-3821

### Description

Fixes a bug where the initial value of the `page-size` attribute on the `<bx-pagination>` component previously did not set the correct `<option>` element within the `<bx-page-sizes-select>` component.

### Changelog

**Changed**

- Updated the `slotchange` handler for the `<bx-page-sizes-select>` component to set the `selected` attribute when applicable.

### Testing Instructions

* Navigate to Pagination > Default story
* Enter a different value for "Number of rows per page (page-size)", using one of the other values in the dropdown, eg. 20 or 30
* Click the "Open canvas in new tab" button, this will initiate the story with the set value for `page-size` to test the bug
* Should see the value you set for the items per page drop down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: carbon web components Ready to merge Label for the pull requests that are ready to merge v1
Projects
None yet
3 participants