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

Function prepend

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

insertMethod · 0.65

Tested by

no test coverage detected