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

VirtualScroller: Unstyled mode broke core functionality #6294

Closed
ITSFerroli opened this issue Aug 26, 2024 · 2 comments
Closed

VirtualScroller: Unstyled mode broke core functionality #6294

ITSFerroli opened this issue Aug 26, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ITSFerroli
Copy link

Describe the bug

When the unstyle mode is set to true, the VirtualScroller component, and all others that use it (e.g., MultiSelect, etc.), do not function as they should.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-vn7zyw?file=src%2Fmain.js

PrimeVue version

4.0.5

Vue version

4.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Please refer to the issue at the provided link and try updating the unstyle parameter in the main.js file. If it is set to false, the VirtualScroller works correctly; if it is set to true, it does not.

Expected behavior

I expect the component to work correctly regardless of the unstyled parameter in the main.js file

@ITSFerroli ITSFerroli added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 26, 2024
@DBolderman
Copy link

Can confirm this issue. I upgraded to PrimeVue version 4.0.4 in unstyled mode with Tailwind and this behaviour occurs in both the Select & MultiSelect components with the virtualScrollerOptions applied. First options are shown when clicked open, but when you start scrolling down the content does not render anymore.

@EdisonHarada
Copy link
Contributor

I had this issue as well, and we need to inject the CSS for virtual scroller. I copied it from the documentation website:

.p-virtualscroller {
  position: relative;
  overflow: auto;
  contain: strict;
  transform: translateZ(0);
  will-change: scroll-position;
  outline: 0 none;
}
.p-virtualscroller-content {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 100%;
  min-width: 100%;
  will-change: transform;
}
.p-virtualscroller-spacer {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 1px;
  transform-origin: 0 0;
  pointer-events: none;
}
.p-virtualscroller-loader {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--p-virtualscroller-loader-mask-background);
  color: var(--p-virtualscroller-loader-mask-color);
}
.p-virtualscroller-loader-mask {
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-virtualscroller-loading-icon {
  font-size: var(--p-virtualscroller-loader-icon-size);
  width: var(--p-virtualscroller-loader-icon-size);
  height: var(--p-virtualscroller-loader-icon-size);
}
.p-virtualscroller-horizontal > .p-virtualscroller-content {
  display: flex;
}
.p-virtualscroller-inline .p-virtualscroller-content {
  position: static;
}

I tried with this CSS and seems to be working

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 29, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.6 milestone Aug 29, 2024
@tugcekucukoglu tugcekucukoglu modified the milestones: 4.0.6, 4.0.7, 4.1.0 Sep 10, 2024
@mertsincan mertsincan self-assigned this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

6 participants
@EdisonHarada @mertsincan @tugcekucukoglu @ITSFerroli @DBolderman and others