web-components
web-components copied to clipboard
[crud] Custom theme attribute on the slotted form is removed
Description
When using a component with some theme set e.g. as a custom slotted form, the theme attribute is reset:
https://github.com/vaadin/web-components/blob/3497f2311e36e85d2eb4a2277d236e688dc1f97a/packages/crud/src/vaadin-crud-mixin.js#L645-L649
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):
https://github.com/vaadin/web-components/blob/3497f2311e36e85d2eb4a2277d236e688dc1f97a/packages/crud/src/vaadin-crud-mixin.js#L670
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
themeis missing
Environment
Vaadin version(s): 24.x
Browsers
Issue is not browser related