We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thank you for the sortable tree! 👍🏻
What is a safe way to add one more child to an item?
trying to change items i get a warning "The final argument passed to useLayoutEffect changed size between renders." and nothing renders.
The text was updated successfully, but these errors were encountered:
Does the following work for you without warnings?
export const TreeRootWithChangeableItems: React.FC<Props> = (props) => { const [items, setItems] = useState(initialItems); return ( <> <button onClick={() => { setItems((oldItems) => { return [ { id: 'NewItem' + new Date().getTime(), text: 'New Item', date: new Date(), children: [], }, ...oldItems, ]; }); }} > Add Item </button> <SortableTree items={items} onItemsChanged={setItems} TreeItemComponent={TreeItem} {...props} /> </> ); };
Sorry, something went wrong.
No branches or pull requests
thank you for the sortable tree! 👍🏻
What is a safe way to add one more child to an item?
trying to change items i get a warning "The final argument passed to useLayoutEffect changed size between renders." and nothing renders.
The text was updated successfully, but these errors were encountered: