Save the role as an input when accepting
This commit is contained in:
@@ -147,7 +147,7 @@ function findNextValidIndex<T>(
|
||||
|
||||
if (currentVisiblePos === -1) {
|
||||
// Current index is hidden, find nearest visible
|
||||
return visibleIndices[0];
|
||||
return visibleIndices[0] ?? 0;
|
||||
}
|
||||
|
||||
// Calculate next position
|
||||
@@ -160,7 +160,7 @@ function findNextValidIndex<T>(
|
||||
nextVisiblePos = Math.max(0, Math.min(visibleIndices.length - 1, nextVisiblePos));
|
||||
}
|
||||
|
||||
return visibleIndices[nextVisiblePos];
|
||||
return visibleIndices[nextVisiblePos] ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user