You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I drag the card from 1st lane over the second (not dropping it yet), all the cards cards in lane 2 re-render.
As suggested in the help doc I have a shouldComponentUpdate on the cardsList.
I added console logs to render methods of the cardsList and card itself. While the cardsList re-render is blocked by the shouldComponentUpdate, the cards in the lane still re-render. It looks like the Draggable may be causing a state change internally and the card gets a change in the style prop.
Is this expected?
Steps to reproduce
See example https://codesandbox.io/s/z3p2825z93.
Drag the card called item 10 over the other lane. Note in the console that every card in the second lane re-renders.
What version of React are you using?
16.3.2
What version of react-beautiful-dnd are you running?
You will notice that only a subset of the draggables are rendering in the second list when you drag over it. These are the draggables that need to move out of the way in response to the new item entering the list. items 26+ do not have their render function called as they do not need to move.
Your should component update check is working as expected 👍
Bug or feature request?
Neither. Question on the performance note here - https://github.com/atlassian/react-beautiful-dnd#recommended-droppable-performance-optimisation.
Example - https://codesandbox.io/s/z3p2825z93
When I drag the card from 1st lane over the second (not dropping it yet), all the cards cards in lane 2 re-render.
As suggested in the help doc I have a shouldComponentUpdate on the cardsList.
I added console logs to render methods of the cardsList and card itself. While the cardsList re-render is blocked by the shouldComponentUpdate, the cards in the lane still re-render. It looks like the Draggable may be causing a state change internally and the card gets a change in the style prop.
Is this expected?
Steps to reproduce
See example https://codesandbox.io/s/z3p2825z93.
Drag the card called item 10 over the other lane. Note in the console that every card in the second lane re-renders.
What version of
React
are you using?16.3.2
What version of
react-beautiful-dnd
are you running?8.0.3
What browser are you using?
Chrome
Demo
https://codesandbox.io/s/z3p2825z93.
The text was updated successfully, but these errors were encountered: