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

Function prepend

packages/react-stately/src/data/useTreeData.ts:336–338  ·  view source on GitHub ↗
(parentKey: Key | null, ...values: T[])

Source from the content-addressed store, hash-verified

334 this.insert(parentNode?.key ?? null, index + 1, ...values);
335 },
336 prepend(parentKey: Key | null, ...values: T[]) {
337 this.insert(parentKey, 0, ...values);
338 },
339 append(parentKey: Key | null, ...values: T[]) {
340 if (parentKey == null) {
341 this.insert(null, items.length, ...values);

Callers

nothing calls this directly

Calls 1

insertMethod · 0.65

Tested by

no test coverage detected