Component Data Grid

Grids are used when displaying a data table.

Code

Example

ID
Animal name
Animal type
1Kittycat
2Dougdog
3Travistiger

Props

AttrTypeDefaultDocs

borders

"all" | "none" | "outside"

'none'

This is the value used to set the table style as bordered.

hoverable

boolean

false

This boolean is the value used to set the table style as hoverable.

labelled-by

string

''

This is the DOM element ID used to label this table. This is used for accessibility.

loading

boolean

false

This boolean is used to set the grid in loading mode.

loading-message

string

'loading...'

This property is the message to be displayed when loading property is set to true.

sort-direction

"ascending" | "descending" | "none"

'none'

This property represents the direction for sorting. Possible values: "none", "ascending", "descending"

sort-on

string

''

This property turns column sorting on. This is used with <som-grid-th name="..." /> and should be set to the name of the column being sorted.

striped

boolean

false

This boolean is the value used to set the table style as striped.

Methods

NameReturnsDocs

sortCompleted

Promise<void>

This public method sets sort-on and sort-direction.

Events

EventDetailDocs

sortChange

any

This event will be triggered when a column sorting is emitted by a column header

Get in touch

Do you have an idea, or want to help us improve this page? Reach out to us via email.

DTMB-DG-Support@michigan.gov

Need help? Visit our Support page to learn how to get assistance, troubleshoot issues, and connect with the team.