-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Describe your motivation
In V25, we support slotted content for vaadin-popover (that has only the default slot).
Same should work in vaadin-dialog in case only default slot and header title are set.
However, vaadin-dialog is lacking some logic for handling header and footer slots.
Describe the solution you'd like
Make it possible to use header and footer slotted content (default slot should in theory work).
In particular, adjust logic for setting has-header and has-footer when such content is present.
Currently, these attributes are only set when headerRenderer or footerRenderer are defined:
web-components/packages/dialog/src/vaadin-dialog-overlay-mixin.js
Lines 118 to 120 in 6610f53
| // Set attributes here to update styles before detecting content overflow | |
| setOverlayStateAttribute(this, 'has-header', !!headerRenderer); | |
| setOverlayStateAttribute(this, 'has-footer', !!footerRenderer); |
Note: we could then also consider updating vaadin-confirm-dialog and vaadin-crud-dialog:
web-components/packages/confirm-dialog/src/vaadin-confirm-dialog-overlay.js
Lines 79 to 81 in 6610f53
| // ConfirmDialog has header and footer but does not use renderers | |
| this.setAttribute('has-header', ''); | |
| this.setAttribute('has-footer', ''); |
web-components/packages/crud/src/vaadin-crud-dialog.js
Lines 81 to 83 in 6610f53
| // CRUD has header and footer but does not use renderers | |
| this.setAttribute('has-header', ''); | |
| this.setAttribute('has-footer', ''); |
Additional context
Similar issue for vaadin-select: #9977