primevue-tailwind
primevue-tailwind copied to clipboard
ptOptions overrides the defaults of its children
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>
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:
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