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

Virtualscroll not adjusting displayed items to available space #6427

Open
ray007 opened this issue Sep 18, 2024 · 0 comments
Open

Virtualscroll not adjusting displayed items to available space #6427

ray007 opened this issue Sep 18, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ray007
Copy link

ray007 commented Sep 18, 2024

Describe the bug

I have a dialog containing a table with a number of columns and rows that's not know when opening the dialog.

For that I would like a dialog with flexible size, that gets larger with more columns/rows to display.
From the docs I thought having scrollHeight for the DataTable to "flex" or "100%" should do this, but it doesn't show any rows at all.

Using a fixed scrollHeight show rows as expected, but leaves empty space with few rows, and does not increase dialog height with many rows.

Changing the scrollHeight later on changes the size of scroller and dialog, but not the number of displayed rows.

Given the amount of horizontal scroll, the dialog and table should also be wider than they are.

I can change the table's and dialog's geometry with script, but haven't yet found how to the the table's virtual scroll to update its number of displayed rows.

I have already posted the question at https://stackoverflow.com/questions/78978286/primevue-dynamic-datatable-in-flexible-dialog, but no luck there so far.

Reproducer

https://stackblitz.com/edit/8fnqmq?file=src%2FApp.vue

PrimeVue version

4.0.5

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Choose scrollHeight setting from select box and press button to show dialog.
Only fixed-height settings show an acceptable result.

Expected behavior

Dialog and table adjust size to the displayed content (with given minimum size), but do not exceed screen size.

@ray007 ray007 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant