-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Description
Description
When using a component with some theme
set e.g. as a custom slotted form, the theme attribute is reset:
web-components/packages/crud/src/vaadin-crud-mixin.js
Lines 645 to 649 in 3497f23
if (theme) { | |
form.setAttribute('theme', theme); | |
} else { | |
form.removeAttribute('theme'); | |
} |
Expected outcome
Expected the theme
to be preserved. We should probably change the logic to not propagate theme
attribute to custom form, like it is done for a custom grid (see __gridPropsChanged
observer):
if (grid === this._gridController.defaultNode) { |
Minimal reproducible example
<vaadin-crud>
<vaadin-vertical-layout slot="form" theme="spacing">
<vaadin-text-field label="First" path="firstName"></vaadin-text-field>
<vaadin-text-field label="Surname" path="lastName"></vaadin-text-field>
</vaadin-vertical-layout>
</vaadin-crud>
Steps to reproduce
- Modify the dev page to use the snippet above
- Open the editor - notice the
theme
is missing
Environment
Vaadin version(s): 24.x
Browsers
Issue is not browser related