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

Function isFirstItem

packages/@react-spectrum/s2/src/ListView.tsx:1047–1052  ·  view source on GitHub ↗
(id: Key | undefined, state: ListState<unknown>)

Source from the content-addressed store, hash-verified

1045}
1046
1047function isFirstItem(id: Key | undefined, state: ListState<unknown>) {
1048 if (id == null || !state) {
1049 return false;
1050 }
1051 return state.collection.getFirstKey() === id;
1052}
1053
1054function isLastItem(id: Key | undefined, state: ListState<unknown>) {
1055 if (id == null || !state) {

Callers 1

ListViewItemFunction · 0.70

Calls 1

getFirstKeyMethod · 0.65

Tested by

no test coverage detected