Examples › Custom row or cell attributes
Adding custom attributes to table rows or table cells could be useful for testing purposes.
You can add custom attributes to the table rows using the customRowAttributes
property. It accepts a function that receives two arguments, record
and recordIndex
and returns an object with attributes to add to the row.
Similarly, each column can have its own customCellAttributes
property that accepts a function that receives two arguments, record
and recordIndex
and returns an object with attributes to add to the cell.
Inspect the table below to see the attributes generated for each row and cell:
Here is the code:
Handling middle-clicks
Here is how you could use the customRowAttributes
property to handle middle-clicks on table rows:
Code:
Head over to the next example to discover more features.