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

Function isFirstItem

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

Source from the content-addressed store, hash-verified

844}
845
846function isFirstItem(id: Key | undefined, state: TreeState<unknown>) {
847 if (id == null || !state) {
848 return false;
849 }
850 return state.collection.getFirstKey() === id;
851}

Callers 1

TreeViewItemContentFunction · 0.70

Calls 1

getFirstKeyMethod · 0.65

Tested by

no test coverage detected