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

Function onMove

examples/s2-vite-project/src/App.tsx:208–214  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

206 }),
207 getAllowedDropOperations: () => ['move'],
208 onMove(e) {
209 if (e.target.dropPosition === 'before') {
210 treeData.moveBefore(e.target.key, e.keys);
211 } else if (e.target.dropPosition === 'after') {
212 treeData.moveAfter(e.target.key, e.keys);
213 }
214 }
215 });
216 return (
217 <TreeView

Callers

nothing calls this directly

Calls 2

moveBeforeMethod · 0.65
moveAfterMethod · 0.65

Tested by

no test coverage detected