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

ptOptions overrides the defaults of its children #320

Open
sergeydus opened this issue Sep 16, 2024 · 0 comments
Open

ptOptions overrides the defaults of its children #320

sergeydus opened this issue Sep 16, 2024 · 0 comments

Comments

@sergeydus
Copy link

sergeydus commented Sep 16, 2024

ptOptions of parent components seem to override the default options of it's child component

expected: the ptOptions of a parent shouldn't affect the styling of the children

Primevue Version: 4.0.5

Firstly, i've overwritten the default ptOptions to be:
app.use(PrimeVue, { unstyled: true, pt: Aura, ptOptions:{ mergeProps: false, } });

this is how the following code looks like without ptOptions, the Button behaves as expected:
<Panel> <Button icon="pi pi-arrow-right" pt:root="bg-green-500" @click="visible = true" /> </Panel>
image

now, if I override the ptOptions in panel, the Buttons style changes, despite the ptOptions being for the Panel component, rather than the Button Component:

<Panel :ptOptions="{ mergeProps: true, mergeSections: true, }" > <Button icon="pi pi-arrow-right" pt:root="bg-green-500" @click="visible = true" /> </Panel>

which results in:
image

reproduction: https://stackblitz.com/edit/wf943d?file=src%2FApp.vue
in the reproduction, simply remove/add the ptOptions in panel, and see how it affects the Button's styling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant