Rename _rowVariant to selectionState

- Updated the variable name from _rowVariant to selectionState for clarity.
- Added a class binding based on the selection state to enhance UI feedback.
This commit is contained in:
Alireza Heidari
2026-03-23 15:40:42 +01:00
committed by Alireza Heidari
parent 9cd8d9c69e
commit e1b22b23f5
@@ -129,12 +129,13 @@ function formatRows() {
for (const item of items.value) {
if (item.isLeaf) {
const _rowVariant =
const selectionState =
selected.value.findIndex((i) => i.id === item.id) !== -1
? SELECTION_STATES.SELECTED
: SELECTION_STATES.UNSELECTED;
set(item, "_rowVariant", _rowVariant);
set(item, "selectionState", selectionState);
set(item, "class", selectionState === SELECTION_STATES.SELECTED ? "table-success" : undefined);
}
}