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

Function isFirstItem

packages/@react-spectrum/s2/src/TreeView.tsx:866–871  ·  view source on GitHub ↗
(id: Key | undefined, state: TreeState<unknown>)

Source from the content-addressed store, hash-verified

864}
865
866function isFirstItem(id: Key | undefined, state: TreeState<unknown>) {
867 if (id == null || !state) {
868 return false;
869 }
870 return state.collection.getFirstKey() === id;
871}

Callers 1

TreeViewItemContentFunction · 0.70

Calls 1

getFirstKeyMethod · 0.65

Tested by

no test coverage detected