3 ms·
Good efforts! Here's some quick feedback: My first thought - how React Arborist is different from Ant Tree? https://ant.design/components/tree/ https://ant.de
by adeptima 5y ago
Good efforts! Here's some quick feedback:
My first thought - how React Arborist is different from Ant Tree?
https://ant.design/components/tree/ https://ant.design/components/tree/
React Arborist dependencies looks sane
https://github.com/brimdata/react-arborist/blob/main/packages/react-arborist/package.json https://github.com/brimdata/react-arborist/blob/main/package...
"memoize-one": "^6.0.0",
"react-dnd": "^14.0.3",
"react-dnd-html5-backend": "^14.0.1",
"react-window": "^1.8.6"
However I was never a fan of react-dnd. Extremely hard to reason about react-dnd-html5-backend and spagetti code once you face edge scenarios.
Hard coded css means I need to fork the library
https://github.com/brimdata/react-arborist/blob/main/packages/react-arborist/src/components/drop-cursor.tsx https://github.com/brimdata/react-arborist/blob/main/package...
const style: CSSProperties = {
position: "absolute",
pointerEvents: "none",
top: top - 2 + "px",
left: treeView.indent + left + "px",
right: treeView.indent + "px",
};
- thoughtpalette 5y agoBeen using AntTree with great success for a complex query builder. Highly recommend.
- jameskerr 5y agoAnt tree looks like a great tree library and is certainly more mature than react-arborist. However, react-arborist supports renaming a node, has a slightly different drag and drop feel, and leaves all styling up to the user. Not just the title, icon, and expand buttons. I agree that the hard-coded DefaultCursor styles need to be configurable. I'll soon update. You'll be able to pass in your own component to render the DropCursor (blue line indicating the new position of the node you're dragging).