Skip to content

Commit 3881b16

Browse files
committed
🐛 (ui) adjust labels condition to invalidate Card memoization
1 parent a7f0d66 commit 3881b16

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

client/src/containers/CardContainer.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,9 @@ function areStatesEqual(next, prev, nextOwnProps) {
163163
return false;
164164
}
165165

166-
if (
167-
n.Label !== p.Label &&
168-
associatedEntityIndexChangedAmongManyToMany(n.CardLabels, n.Label, p.Label, cardId, 'toLabelId')
169-
) {
166+
// re-render on any label change (create, delete, rename, color) since all board labels are passed to the card popover
167+
// (otherwise we would have used the condition `associatedEntityIndexChangedAmongManyToMany(n.CardLabels, n.Label, p.Label, cardId, 'toLabelId')`
168+
if (n.Label !== p.Label) {
170169
return false;
171170
}
172171

0 commit comments

Comments
 (0)