add default ouia-id to paginated tables

This commit is contained in:
Keith J. Grant
2021-05-03 12:04:33 -07:00
parent b21db2fd31
commit 2672c2ffe3

View File

@@ -96,7 +96,10 @@ function PaginatedTable({
Content = ( Content = (
<div css="overflow: auto"> <div css="overflow: auto">
{hasContentLoading && <LoadingSpinner />} {hasContentLoading && <LoadingSpinner />}
<TableComposable aria-label={dataListLabel} ouiaId={ouiaId}> <TableComposable
aria-label={dataListLabel}
ouiaId={ouiaId || `paginated-table-${pluralizedItemName}`}
>
{headerRow} {headerRow}
<Tbody>{items.map(renderRow)}</Tbody> <Tbody>{items.map(renderRow)}</Tbody>
</TableComposable> </TableComposable>