Skip to content

fix: CDataTable: set select default value to perPageItems if possible #149

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

Closed
wants to merge 1 commit into from

Conversation

Downsidelama
Copy link

When CDataTable is being created with itemsPerPageSelect prop, it will always show the first item in the select's options.
There was a hidden option, which I removed and changed the default to perPageItems.
If there is no matching value in the array, then it will select the first from the options.

Copy link

@vladyslav-kushnir vladyslav-kushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add perPageItems as an additional option to the dropdown maybe in case it's missing from the paginationSelect.values list? You can do so by simply introducing bool flag before you go over collection with map and inside that map method setting it to true in case value is the same. Then after the whole map you can check if flag is false you simply add one more option. Hope that makes sense.

@xidedix
Copy link
Member

xidedix commented Dec 18, 2020

@Downsidelama
Thanks for this PR, it should be merged long time ago. This omission is our fault.
Fixed in similar fashion with - fix(CDataTable): missing select perPageItems initial value eaca895
Closing. If it doesn't fix the issue, please feel free to reopen.

@xidedix xidedix closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants