Skip to content

Commit

Permalink
fix: nodes not being removed from node bucket after drop in bin
Browse files Browse the repository at this point in the history
need rerender of transitiongroup after sortednodes changes. implemented using a key
  • Loading branch information
buckhalt committed Jan 31, 2024
1 parent 396126a commit 8f27342
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/interviewer/components/MultiNodeBucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const MultiNodeBucket = (props) => {
}, [nodes, sortOrder, listId, currentListId]);

return (
<TransitionGroup className="node-list" exit={exit}>
<TransitionGroup className="node-list" exit={exit} key={sortedNodes}>
{sortedNodes.slice(0, 3).map((node, index) => (
<NodeTransition
key={`${node[entityPrimaryKeyProperty]}_${index}`}
Expand All @@ -85,7 +85,6 @@ const MultiNodeBucket = (props) => {

MultiNodeBucket.propTypes = {
nodes: PropTypes.array,
nodeColor: PropTypes.string,
itemType: PropTypes.string,
label: PropTypes.func,
listId: PropTypes.string.isRequired,
Expand Down

0 comments on commit 8f27342

Please sign in to comment.