Row actions
Row action buttons placed in a table cell
Demo
Header 1 | |
---|---|
Cell text |
|
Cell text |
|
Cell text |
|
Cell text |
|
API
Tag
Name | Description |
<s-row-actions>
|
Custom element, accepts button children |
Attributes
Name | Value | Required | Description |
menuid |
string |
|
Unique |
icononly |
Boolean attribute |
Add this attribute at narrow column widths to display only the icons in buttons that contain icons. |
|
collapsed |
Boolean attribute |
Add this attribute at very narrow column widths to display only the overflow menu. |
|
actionitems |
String |
Stringified JSON array of action objects. See Guidelines below. |
|
i18n |
string |
A stringified JSON object which defines a list of localized strings. The keys must be one of the string IDs defined below. |
Properties
Name | Value | Required | Description |
---|---|---|---|
menuId |
string |
|
Unique |
iconOnly |
Boolean attribute |
Add this attribute at narrow column widths to display only the icons in buttons that contain icons. |
|
collapsed |
Boolean attribute |
Add this attribute at very narrow column widths to display only the overflow menu. |
|
actionItems |
Array | Array of action objects. See Guidelines below. | |
i18n |
object |
A JSON object which defines a list of localized strings. The keys must be one of the string IDs defined below. |
Events
Name | Detail | Description |
---|---|---|
s-select |
The selected action item's id
|
Fires when an action item button is clicked. |
Demo
API
Tag
Name |
<SRowActions>
|
Props
Name | Value | Required | Description |
---|---|---|---|
menuId |
string |
|
Unique |
iconOnly |
Boolean |
Add this prop at narrow column widths to display only the icons in buttons that contain icons. |
|
collapsed |
Boolean |
Add this prop at very narrow column widths to display only the overflow menu. |
|
actionItems |
Array of objects |
Array of action objects. See Guidelines below. |
|
onS-select |
Function |
Handles the |
|
i18n |
object |
A JSON object which defines a list of localized strings. The keys must be one of the string IDs defined below. |
Skylab React links
Typescript
Exported types
i18n Strings
ID | Description | Default value |
---|---|---|
"rowActions.ariaLabel.menuTrigger"
|
The aria-label used for the overflow menu trigger. | More actions |
Guidelines
Parent element required
The row actions component must be enclosed in a <td>
element.
Creating action items
The action items (individual buttons) within the component are set via an array of objects.
To pass the action items to the s-row-actions
component, you can either set
the actionItems
property equal to your array of objects, as in the code sample above, or you can stringify your array and set the actionitems
attribute.
Design
Design resources can be found on the Skylab design documentation site: skylab.avalara.com