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

ScrollPanel pushes content to the left in order to show scrollbar #1131

Closed
mwe-code opened this issue Mar 29, 2021 · 2 comments
Closed

ScrollPanel pushes content to the left in order to show scrollbar #1131

mwe-code opened this issue Mar 29, 2021 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@mwe-code
Copy link

Hi @cagataycivici,

I would like to add this example where the scrollbar of the scrollpanel pushes it's content to the left.
PrimeVue-Panel-in-ScrollPanel

Is it possible to always show that scrollbar at the scrollpanel? So it's content is not pushed to the left while overflowing.

Code:

<template>
	<div class="p-grid nested-grid">
		<div class="p-col-6 p-pl-4 p-pr-2 p-py-2">
			<ScrollPanel class="p-col-12" style="width: 100%; height: 90vh;">
				<Panel header="Header 1" :toggleable="true" class="p-mb-2 color-background">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
				<Panel header="Header 2" :toggleable="true" class="p-mb-2">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
				<Panel header="Header 3" :toggleable="true" class="p-mb-2">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
				<Panel header="Header 4" :toggleable="true" class="p-mb-2">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
				<Panel header="Header 5" :toggleable="true" class="p-mb-2">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
				<Panel header="Header 6" :toggleable="true">
					Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
					Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
					Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
					cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</Panel>
			</ScrollPanel>

		</div>
		<div class="p-col-6 p-pl-2 p-pr-4 p-py-2">
			<Card class="p-shadow-2">
				<template #title>
					SOME CARD TITLE
				</template>
				<template #content>
					<h3>TO BE IMPLEMENTED</h3>
					<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
						Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
						Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
						cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
				</template>
			</Card>
		</div>
	</div>
</template>

<script lang="ts">
</script>
<style lang="scss">

.p-panel-content {
	background-color: green!important;
}

</style>
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 10, 2021
@cagataycivici cagataycivici added this to the 3.5.0 milestone May 11, 2021
@mertsincan mertsincan removed this from the 3.5.0 milestone May 15, 2021
@mertsincan mertsincan removed Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add priority - low labels May 15, 2021
@mertsincan
Copy link
Member

Hi,

Please try;

.p-scrollpanel .p-scrollpanel-content {
    overflow: scroll;
}

Best Regards,

@mertsincan mertsincan added this to the 3.5.0 milestone May 15, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 15, 2021
@mertsincan
Copy link
Member

I decided to add the above solution to core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants