Usage
import { TableRow } from 'nr1'
Props
[]
Defines a set of actions that will appear when the user hovers the row. Actions have a mandatory text and onClick callbacks (that will be called with the item and index of the row they belong to), and they also accept a disabled property.
shape
Use it to describe the row's action.
Callback fired any time the user clicks on the action.
function (event: React.MouseEvent )
Adds a data-test-id
attribute. Use it to target the component in unit and
E2E tests.
For a test id to be valid, prefix it with your nerdpack id, followed up by a dot.
For example, my-nerdpack.some-element
.
Note: You might not see data-test-id
attributes as they are removed
from the DOM, to debug them pass a e2e-test
query parameter to the URL.
Type of action for each of the items in the actions dropdown.
It's not mandatory, its default is
TableRow.ACTION_TYPE.NORMAL
.
-
Normal — generic non-critical action.
-
Destructive — use when you have a destructive action like delete or remove, which you would like the user to pause and consider before completing.
<One ofTableRow.ACTION_TYPE.DESTRUCTIVE,TableRow.ACTION_TYPE.NORMAL,>
List of row cells, in the shape of <TableRowCell>
s. Cells need to
be direct children of the row, i.e. there must not be any node
between <TableRow>
and <TableRowCell>
s.
Callback fired any time the user clicks on the table row.
function (event: React.MouseEvent )