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

[Bug Report] Paginations are still breaking out of their parent component #8146

Closed
ChrisLandowski opened this issue Jul 29, 2019 · 4 comments
Assignees
Labels
C: VPagination VPagination T: bug Functionality that does not work as intended/expected
Milestone

Comments

@ChrisLandowski
Copy link

Environment

Vuetify Version: 2.0.2
Vue Version: 2.6.10
Browsers: Safari 12.1.1
OS: Mac OS 10.14.5

Steps to reproduce

Open the codepen.

Expected Behavior

The entire pagination component should fit within the parent card component.

Actual Behavior

Both the prior and next buttons are extending outside the parent card component.

Reproduction Link

https://codepen.io/anon/pen/PMNzLj?&editable=true&editors=101

Other comments

Changing the width of the card to 500 works while 600 does not.
The v2.0.2 changes made for #7947 didn't completely fix the previously reported bug..

@ghost ghost added the S: triage label Jul 29, 2019
@chouhanyang
Copy link
Contributor

chouhanyang commented Jul 30, 2019

Hi, I'm new to this, but I'm hitting the opposite of this problem. I think previous fix assume the width of the containing element is known, so we can calculate maxButtons. However, it may not always be the case. For example, I'm putting pagination control to the top right inline with other controls. Now, with pagination set to width 100% by default, which takes entire line. I have to wrap it with a div, which calculate its size from pagination control. And this cause the "..." shows up.

<v-card-title>
  <v-text-field
    ...
  ></v-text-field>
  <v-btn
    ...
  >
    <v-icon>add</v-icon>
  </v-btn>
  <v-btn
    ...
  >
    <v-icon>delete_outline</v-icon>
  </v-btn>
  <v-spacer></v-spacer>
  <div>
    <v-pagination ></v-pagination>
  </div>
</v-card-title>

with the extra div around pagination, it will become

image

I only have 3 pages, very weird. And then, it will become correct next rendering (click a button).

image

Just FYI. My current workaround is to force remove width 100% style on pagination.

Reproduction Link

https://codepen.io/chouhanyang/pen/PMpbQj

@jacekkarczmarczyk jacekkarczmarczyk added C: VPagination VPagination T: bug Functionality that does not work as intended/expected and removed S: triage labels Jul 30, 2019
@psheth1811
Copy link

The given solution is not fixing the issue. I am still able to reproduce it.

@ChrisLandowski
Copy link
Author

A workaround to this problem is to use the total-visible property. I am using :total-visible="($vuetify.breakpoint.width - $vuetify.application.left - 104) / 44 - 1" on a fluid v-container without any problems.

@fnaysee
Copy link

fnaysee commented Mar 9, 2021

@ChrisLandowski Thank you. Your solution worked for me with few modification.
I used it like below inside a v-card:
:total-visible="($vuetify.breakpoint.width - $vuetify.application.left - 304) / 44 - 1"

@KaelWD KaelWD added this to the v3.0.0 milestone Jun 30, 2021
KaelWD added a commit that referenced this issue Jun 30, 2021
resolves #4201
fixes #11242
resolves #8759 (use slot)
fixes #12395
resolves #2070
resolves #5028
fixes #8146
resolves #2541
fixes #11662
fixes #12232
resolves #10085

Co-authored-by: John Leider <john.j.leider@gmail.com>
Co-authored-by: Kael <kaelwd@gmail.com>
@KaelWD KaelWD closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VPagination VPagination T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

7 participants