Skip to content

Row, Cell Hover and Select

demo

loading

Disabling Row Selection

You can use rowActive.disabled to disable the selection function for specific rows.

Note

rowActive.disabled: The row cannot be selected by clicking. However, this row can still be selected through the setCurrentRow method.

Setting Current Row

You can select the current row by calling the component method expose setCurrentRow

Setting Selected Cell

You can select the current cell by calling the component method expose setSelectedCell

API

keyTypeDefaultDescription
rowHoverbooleantrueWhether to highlight hovered rows
rowActiveboolean | RowActiveOptiontrueWhether to highlight selected rows
rowCurrentRevokable deprecated(v0.8.9) Please use rowActive.revokablebooleantrueWhether clicking on the current row again can deselect it (when rowActive=true)
cellHoverbooleanfalseWhether to highlight hovered cells
cellActivebooleanfalseWhether to highlight selected cells
selectedCellRevokablebooleantrueWhether clicking on the cell again can deselect it (when cellActive=true)

TIP

If rowActive is set to false, it only hides the internal style of the component. The active class will still be added to the tr element for custom styling convenience.

RowActiveOption

keyTypeDefaultDescription
enabledbooleantrueWhether to enable row selection function
disabled(row: DT) => boolean() => falseWhether to disable row selection
revokablebooleantrueWhether selection can be revoked

Released under the MIT License