mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
feat(base): row ARIA index and selected state
This commit is contained in:
@@ -160,12 +160,15 @@ export const GridRow = memo(function GridRow({
|
|||||||
data-index={rowIndex}
|
data-index={rowIndex}
|
||||||
className={`${classes.row} ${classes.virtualRow} ${isDragging ? classes.rowDragging : ""} ${dropIndicatorClass} ${isSelected ? classes.rowSelected : ""}`}
|
className={`${classes.row} ${classes.virtualRow} ${isDragging ? classes.rowDragging : ""} ${dropIndicatorClass} ${isSelected ? classes.rowSelected : ""}`}
|
||||||
role="row"
|
role="row"
|
||||||
|
aria-rowindex={rowIndex + 1}
|
||||||
|
aria-selected={isSelected}
|
||||||
>
|
>
|
||||||
{row.getVisibleCells().map((cell) => (
|
{row.getVisibleCells().map((cell, colIndex) => (
|
||||||
<GridCell
|
<GridCell
|
||||||
key={cell.id}
|
key={cell.id}
|
||||||
cell={cell}
|
cell={cell}
|
||||||
rowIndex={rowIndex}
|
rowIndex={rowIndex}
|
||||||
|
colIndex={colIndex}
|
||||||
onCellUpdate={onCellUpdate}
|
onCellUpdate={onCellUpdate}
|
||||||
pageId={pageId}
|
pageId={pageId}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user