Skip to content

Commit 529ede5

Browse files
committed
fix: duplicate key
1 parent a7dd6c6 commit 529ede5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

frontend/app_flowy/lib/plugins/board/presentation/board_page.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class _BoardContentState extends State<BoardContent> {
214214

215215
Widget _buildCard(
216216
BuildContext context,
217-
AppFlowyGroupData column,
217+
AppFlowyGroupData group,
218218
AppFlowyGroupItem columnItem,
219219
) {
220220
final boardColumnItem = columnItem as BoardColumnItem;
@@ -241,10 +241,11 @@ class _BoardContentState extends State<BoardContent> {
241241
},
242242
);
243243

244-
ValueKey? key = cardKeysCache[columnItem.id];
244+
final groupItemId = columnItem.id + group.id;
245+
ValueKey? key = cardKeysCache[groupItemId];
245246
if (key == null) {
246-
final newKey = ValueKey(columnItem.id);
247-
cardKeysCache[columnItem.id] = newKey;
247+
final newKey = ValueKey(groupItemId);
248+
cardKeysCache[groupItemId] = newKey;
248249
key = newKey;
249250
}
250251

@@ -254,7 +255,7 @@ class _BoardContentState extends State<BoardContent> {
254255
decoration: _makeBoxDecoration(context),
255256
child: BoardCard(
256257
gridId: gridId,
257-
groupId: column.id,
258+
groupId: group.id,
258259
fieldId: boardColumnItem.fieldContext.id,
259260
isEditing: isEditing,
260261
cellBuilder: cellBuilder,

0 commit comments

Comments
 (0)