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

Setting pagination option perPageDropdownEnabled to false is not hiding per page dropdown. #831

Closed
1 task done
ctwillie opened this issue Mar 11, 2021 · 6 comments
Closed
1 task done

Comments

@ctwillie
Copy link

ctwillie commented Mar 11, 2021

Issue Type

  • Bug

Specs

vue-good-table 2.21.1
VueJs 2.6.12
Browser: Version 88.0.4324.190 (Official Build) (64-bit)

Expected Behavior

Setting the paginationOptions perPageDropdownEnabled to boolean false would disable/hide the per page dropdown.

Actual Behavior

Setting the paginationOptions perPageDropdownEnabled to boolean false did not disable/hide the per page dropdown. It still behaved as if the option was true.

Steps to Reproduce the Problem

  1. Use remote mode.
  2. Set perPageDropdownEnabled to false in paginationOptions.

jsfiddle

Could not reproduce in jsfiddle. Not sure if this is because I am using remote mode.

@xaksis
Copy link
Owner

xaksis commented Mar 11, 2021

here's an example of it working in remote mode:
https://jsfiddle.net/aks9800/mc2sfkjb/

closing.

@xaksis xaksis closed this as completed Mar 11, 2021
@ctwillie
Copy link
Author

@xaksis Thanks for the response, and I'm glad it works in jsfiddle. But there is nothing obvious as to why it is not working if that option is present. A few suggestions as to why the presence of this option, and it being set to false, would still not hide the select would be nice before this is abandoned.

<vue-good-table
  mode="remote"
  @on-page-change="onPageChange"
  @on-sort-change="onSortChange"
  :isLoading.sync="isLoading"
  :pagination-options="paginationOptions"
  :totalRows="totalRows"
  :rows="rows"
  :columns="columns"
>
</vue-good-table>

<script>
export default {
  ...,
  data() {
    return {
      ...
      paginationOptions: {
        enabled: true,
        perPageDropdownEnabled: false,
      }
    }
  } 
}
</script>

@xaksis
Copy link
Owner

xaksis commented Mar 11, 2021

hey @ctwillie, the jsfiddle I created shows you that the option does what it's supposed to in remote mode. Now, unless you create an example demonstrating the issue, it'll be very difficult for anyone to guess as to why this isn't working for you.
The code snippet certainly helps so thank you for posting that now. But from the partial code, I don't see what could be wrong. Do you have any suggestions as to how one should go about helping here? Is the paginationOptions changing somewhere else in your code? are you setting paginationOptions later somewhere without thinking about vue reactivity? But again, these questions would just be like shooting arrows in the dark without seeing a full picture of what you're doing, etc.

@ctwillie
Copy link
Author

ctwillie commented Mar 12, 2021

@xaksis Thanks again for your response.

Is the paginationOptions changing somewhere else in your code? No.
Are you setting paginationOptions later somewhere without thinking about vue reactivity? No.

There is really nothing fancy at all going on in the component. Just a single file vue component using vue-good-table. The pagination options are set, and never changed.

I implemented remote mode yesterday, which works beautifully (besides this issue which you just fixed, thanks!), then set perPageDropdownEnabled to false in paginationOptions. The select was not hidden.

I don't want to seem too persistent about solving this, but my employer suggested I use data tables. But I rather support the great work you are doing here so you all can get the recognition you deserve. I tinker with it some more and see if I can get to the bottom of this. Thank you.

@ctwillie
Copy link
Author

@xaksis Upgraded from v2.21.1 to v2.21.8. This issue was resolved. Was something in v2.21.1. Thanks.

@xaksis
Copy link
Owner

xaksis commented Mar 12, 2021

Ah okay! Glad that you were able to resolve it.

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

No branches or pull requests

2 participants