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

Function isFirstItem

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

Source from the content-addressed store, hash-verified

851}
852
853function isFirstItem(id: Key | undefined, state: TreeState<unknown>) {
854 if (id == null || !state) {
855 return false;
856 }
857 return state.collection.getFirstKey() === id;
858}

Callers 1

TreeViewItemContentFunction · 0.70

Calls 1

getFirstKeyMethod · 0.65

Tested by

no test coverage detected