diff --git a/components/lib/virtualscroller/BaseVirtualScroller.vue b/components/lib/virtualscroller/BaseVirtualScroller.vue index 809715efe..0cff38a22 100644 --- a/components/lib/virtualscroller/BaseVirtualScroller.vue +++ b/components/lib/virtualscroller/BaseVirtualScroller.vue @@ -5,6 +5,7 @@ import { useStyle } from 'primevue/usestyle'; const styles = ` .p-virtualscroller { position: relative; + overflow: auto; contain: strict; transform: translateZ(0); will-change: scroll-position; @@ -64,35 +65,6 @@ const styles = ` } `; -const inlineStyles = { - root: { overflow: 'auto' } -}; - -const classes = { - root: ({ instance, props }) => [ - 'p-virtualscroller', - { - 'p-virtualscroller-inline': props.inline, - 'p-virtualscroller-both p-both-scroll': instance.isBoth(), - 'p-virtualscroller-horizontal p-horizontal-scroll': instance.isHorizontal() - } - ], - content: ({ instance }) => [ - 'p-virtualscroller-content', - { - 'p-virtualscroller-loading': instance.d_loading - } - ], - spacer: 'p-virtualscroller-spacer', - loader: ({ instance }) => [ - 'p-virtualscroller-loader', - { - 'p-component-overlay': !instance.$slots.loader - } - ], - loadingIcon: 'p-virtualscroller-loading-icon' -}; - const { load: loadStyle } = useStyle(styles, { name: 'virtualscroller' }); export default { @@ -181,8 +153,6 @@ export default { } }, css: { - classes, - inlineStyles, loadStyle }, provide() { diff --git a/components/lib/virtualscroller/VirtualScroller.vue b/components/lib/virtualscroller/VirtualScroller.vue index 7461a8976..6fbc547d0 100644 --- a/components/lib/virtualscroller/VirtualScroller.vue +++ b/components/lib/virtualscroller/VirtualScroller.vue @@ -1,9 +1,9 @@