From 43988ea12bbb2b7f102e106a4bb383c7379c1f24 Mon Sep 17 00:00:00 2001 From: Carlos Valente <34649812+cpvalente@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:56:53 +0200 Subject: [PATCH] fix: stale ids in cuesheet (#1657) --- apps/client/src/common/hooks-query/useRundown.ts | 2 +- .../cuesheet-table/cuesheet-table-elements/EventRow.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/common/hooks-query/useRundown.ts b/apps/client/src/common/hooks-query/useRundown.ts index 67629d4d9..f2f070167 100644 --- a/apps/client/src/common/hooks-query/useRundown.ts +++ b/apps/client/src/common/hooks-query/useRundown.ts @@ -41,7 +41,7 @@ export function useFlatRundown() { // update data whenever the revision changes useEffect(() => { - if (data.revision !== -1 && data.revision !== prevRevision) { + if (data.revision !== -1 || data.revision !== prevRevision) { const flatRundown = data.order.map((id) => data.rundown[id]); setFlatRunDown(flatRundown); setPrevRevision(data.revision); diff --git a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EventRow.tsx b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EventRow.tsx index a16be1e6e..d7f14c837 100644 --- a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EventRow.tsx +++ b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/EventRow.tsx @@ -29,6 +29,7 @@ interface EventRowProps { export default memo(EventRow, (prevProps, nextProps) => { return ( prevProps.rowId === nextProps.rowId && + prevProps.event.id === nextProps.event.id && prevProps.event.revision === nextProps.event.revision && prevProps.eventIndex === nextProps.eventIndex && prevProps.rowIndex === nextProps.rowIndex &&