Skip to content

Commit ad78549

Browse files
committed
fix: re-run only if part.segmentId has changed
1 parent 631ef97 commit ad78549

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/webui/src/client/ui/UserEditOperations/PropertiesPanel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function PropertiesPanel(): JSX.Element {
7272

7373
const segment: DBSegment | undefined = useTracker(
7474
() => Segments.findOne({ _id: part ? part.segmentId : selectedElement?.elementId }),
75-
[selectedElement?.elementId, part]
75+
[selectedElement?.elementId, part?.segmentId]
7676
)
7777
const rundownId = part ? part.rundownId : segment?.rundownId
7878

@@ -429,7 +429,6 @@ function EditingTypeChangeSourceLayerSource(props: {
429429
pendingChanges: PendingChange[]
430430
setPendingChanges: React.Dispatch<React.SetStateAction<PendingChange[]>>
431431
}) {
432-
const { t } = useTranslation()
433432
const [selectedSourceGroup, setSelectedSourceButton] = React.useState<SourceLayerType>(
434433
props.pendingChanges.find((change) => change.operationId === props.userEditOperation.id)?.sourceLayerType ||
435434
props.userEditOperation.currentValues.type

0 commit comments

Comments
 (0)