MCPcopy Create free account
hub / github.com/adobe/react-spectrum / isPrevSelected

Function isPrevSelected

packages/@react-spectrum/s2/src/TableView.tsx:2333–2339  ·  view source on GitHub ↗
(id: Key | undefined, state: TableState<unknown>)

Source from the content-addressed store, hash-verified

2331}
2332
2333export function isPrevSelected(id: Key | undefined, state: TableState<unknown>) {
2334 if (id == null || !state) {
2335 return false;
2336 }
2337 let keyBefore = state.collection.getKeyBefore(id);
2338 return keyBefore != null && state.selectionManager.isSelected(keyBefore);
2339}
2340
2341function isFirstItem(id: Key | undefined, state: TableState<unknown>) {
2342 if (id == null || !state) {

Callers 1

TableView.tsxFile · 0.70

Calls 2

getKeyBeforeMethod · 0.65
isSelectedMethod · 0.65

Tested by

no test coverage detected