Salta ai contenuti
Magma Design System
Table header<mds-table-header>Generato da @maggioli-design-system/magma@2.3.0dist/documentation.json. Incapsulamento: shadow.
Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
Il primo esempio della pagina Pattern, dal vivo. Cambia le sue proprietà qui sotto e l'anteprima le segue; Ripristina riporta l'esempio com'era.
Proprietà
selectableselectablebooleanEnables the select-all checkbox in the header.
Panoramica
The <mds-table-header> web component is the header region of a Magma table, used exclusively as a direct slot child of its parent <mds-table>. It plays the role of an HTML <thead>/header row, hosting the column-header cells and, when selection is enabled, the master “select all” control.
Semantic Behavior
Compound child only: Must be slotted directly inside <mds-table> alongside mds-table-body (and optionally mds-table-footer); it is not used standalone. It is itself the header row: its own default slot accepts mds-table-header-cell element(s), one per column.Parent-driven selection state: When selectable is true the header renders a master checkbox that the parent keeps in sync - indeterminate for partial selection and checked when all rows are selected.Selection reported upward: Toggling the master checkbox selects or deselects every row, after which the table re-emits its own mdsTableSelectionChange event.Automatic actions column: When any row exposes a [slot="action"], the header appends an extra header cell (exposed as the actions shadow part) labelled with the localized “actions” string.Localized labels: The select-all/select-none switch title and the actions label are localized (el/en/es/it).
Properties & Visual Configurations
This child is configured almost entirely by its parent rather than by author-set attributes. selectable: Toggles rendering of the leading master-checkbox column. It is not normally set by hand - <mds-table> propagates its own selectable prop down to the header, so enabling selection on the table is what surfaces this control here. Beyond selectable, content is provided through the default slot (mds-table-header-cell elements); there are no shared variant/tone ladders on this component.
Dipendenze
Usa: mds-table-cell, mds-input-switch, mds-table-header-cell