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

per page dropdown incorrect when setting perPageDropdown array #479

Closed
1 task done
corbosman opened this issue Dec 23, 2018 · 5 comments
Closed
1 task done

per page dropdown incorrect when setting perPageDropdown array #479

corbosman opened this issue Dec 23, 2018 · 5 comments
Labels

Comments

@corbosman
Copy link

Issue Type (delete the irrelevant ones)

  • Bug

Specs

What version are you using? 2.16.0

What browser? Chrome

Expected Behavior

What did you expect to happen?

When I change the page size, the dropdown should reflect the new page size

Actual Behavior

What actually happened?

The dropdown remains on the default page size. Important to note is that if I dont provide a perPageDropdown array, everything works fine.

Steps to Reproduce the Problem

Please detail your steps here

  1. Set your own perPageDropdown, this is what I have:
<vue-good-table
                        :isLoading="loading"
                        :columns="columns"
                        mode="remote"
                        @on-page-change="onPageChange"
                        @on-column-filter="onColumnFilter"
                        @on-per-page-change="onPerPageChange"
                        @on-search="onSearch"
                        :rows="rows"
                        :searchOptions="{
                            enabled: true,
                            placeholder: 'Zoeken',
                        }"
                        :sort-options="{ enabled: false }"
                        styleClass="table table-striped table-bordered"
                        ref="auditTable"
                        :totalRows="totalRecords"
                        :paginationOptions="{
                            enabled: true,
                            mode: 'records',
                            perPage: 20,
                            position: 'top',
                            perPageDropdown: [20, 50, 100, 200 ],
                            dropdownAllowAll: false,
                            nextLabel: 'volgende',
                            prevLabel: 'vorige',
                            rowsPerPageLabel: 'per pagina',
                            ofLabel: 'van',
                            pageLabel: 'page', // for 'pages' mode
                            allLabel: 'All',
                        }">
  1. Change the dropdown from 20 to 50. Dropdown stays on 20, even though 50 records are now fetched.

  2. Cant change back to 20 because VGT thinks it's already selected.

jsfiddle

If you provide a jsfiddle reproducing the issue, it'll be addressed much faster.
you can use this as base

@xaksis xaksis added the bug label Jan 17, 2019
@projct1
Copy link

projct1 commented Jan 21, 2019

Agree. Still not working. Here some issue, but closed =\ #443

@iAn-Pinto
Copy link

Issue not fixed in v2.16. Kindly help resolve.

Issue Type (delete the irrelevant ones)

  • Bug

Specs

What version are you using? 2.16.0

What browser? Chrome

Expected Behavior

What did you expect to happen?

When I change the page size, the dropdown should reflect the new page size

Actual Behavior

What actually happened?

The dropdown remains on the default page size. Important to note is that if I dont provide a perPageDropdown array, everything works fine.

Steps to Reproduce the Problem

Please detail your steps here

  1. Set your own perPageDropdown, this is what I have:
<vue-good-table
                        :isLoading="loading"
                        :columns="columns"
                        mode="remote"
                        @on-page-change="onPageChange"
                        @on-column-filter="onColumnFilter"
                        @on-per-page-change="onPerPageChange"
                        @on-search="onSearch"
                        :rows="rows"
                        :searchOptions="{
                            enabled: true,
                            placeholder: 'Zoeken',
                        }"
                        :sort-options="{ enabled: false }"
                        styleClass="table table-striped table-bordered"
                        ref="auditTable"
                        :totalRows="totalRecords"
                        :paginationOptions="{
                            enabled: true,
                            mode: 'records',
                            perPage: 20,
                            position: 'top',
                            perPageDropdown: [20, 50, 100, 200 ],
                            dropdownAllowAll: false,
                            nextLabel: 'volgende',
                            prevLabel: 'vorige',
                            rowsPerPageLabel: 'per pagina',
                            ofLabel: 'van',
                            pageLabel: 'page', // for 'pages' mode
                            allLabel: 'All',
                        }">
  1. Change the dropdown from 20 to 50. Dropdown stays on 20, even though 50 records are now fetched.
  2. Cant change back to 20 because VGT thinks it's already selected.

jsfiddle

If you provide a jsfiddle reproducing the issue, it'll be addressed much faster.
you can use this as base

@skegel13
Copy link

skegel13 commented Feb 8, 2019

I am also seeing this issue. It is only happening when the perPageDropdown custom. When not set, everything works fine.

@xaksis xaksis closed this as completed in 34c6e64 Mar 3, 2019
@xaksis
Copy link
Owner

xaksis commented Mar 3, 2019

sorry for the delay on this. v2.16.3 should have this fixed.

@DerekNMartin
Copy link

DerekNMartin commented Nov 6, 2019

I'm still experiencing this issue on 2.18 with custom perPageDropdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants