need example for renderCursor or renderDragPreview
Like the Gmail example? here is the code: https://github.com/brimdata/react-arborist/blob/main/packages/showcase/pages/gmail.tsx
const MyDragPreview: React.FC<DragPreviewProps> = ({ offset }) => { const style: React.CSSProperties = { position: 'absolute', top: offset ? offset.y : -50, left: offset ? offset.x : -50, height: 30, width: 30, minWidth: 30, };
return <div style={style}>
<Avatar icon={'pi pi-check'} size="normal" shape="circle" />
</div>;
}; ` thanks it's my solution for preview
const MyDragPreview: React.FC = ({ offset }) => { const style: React.CSSProperties = { position: 'absolute', top: offset ? offset.y : -50, left: offset ? offset.x : -50, height: 30, width: 30, minWidth: 30, };
return <div style={style}> <Avatar icon={'pi pi-check'} size="normal" shape="circle" /> </div>;}; ` thanks it's my solution for preview
do you have an example of 'oncreate'?
no
const MyDragPreview: React.FC = ({ offset }) => { const style: React.CSSProperties = { position: 'absolute', top: offset ? offset.y : -50, left: offset ? offset.x : -50, height: 30, width: 30, minWidth: 30, };
return <div style={style}> <Avatar icon={'pi pi-check'} size="normal" shape="circle" /> </div>;}; ` thanks it's my solution for preview
do you have an example of 'oncreate'?
there is no tree that controls itself in the backend
Since we don't have access to useTreeApi like the source code, how are we supposed to customize the drag preview? I don't have any of the props or metadata my Item renderer relies on. I don't even have the label.
https://github.com/brimdata/react-arborist/blob/main/packages/showcase/pages/gmail.tsx
Create one. i recreated the TreeApi for something similir to this Gmail example.