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
{{ message }}
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.
If you would write a new reducer that would change the card
EXAMPLE:
case CHANGE_CARD: {
const newLists = [...state.lists];
// First card in first row
newLists[0].cards[0].title = "test";
return state.withMutations((ctx) => {
ctx.set('lists', newLists);
});
This results in
The state updates
Board re-render with new props
CardsContainer re-render with new props
Cards re-render with new props
But here is the error, when debugging the code in the Render function in Cards, the CardList array is updated and if you look at the CardList data the props have the new title as "test" BUT DraggableCard does NOT re-render.
But as soon as you move the card by dragging, then the re-render of DraggableCard works and the correct title "test" is rendered.
The text was updated successfully, but these errors were encountered:
If you change the ID everything work's as normal because the ID is a key for the Card component.
A workaround could be to have a "updated" time stamp on each item and use that time stamp + the id as the key to force the re-render on update but that is hacky
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you would write a new reducer that would change the card
EXAMPLE:
This results in
But here is the error, when debugging the code in the Render function in Cards, the CardList array is updated and if you look at the CardList data the props have the new title as "test" BUT DraggableCard does NOT re-render.
But as soon as you move the card by dragging, then the re-render of DraggableCard works and the correct title "test" is rendered.
The text was updated successfully, but these errors were encountered: