Skip to content

Commit 6c3e643

Browse files
mattdawkinsclaude
andcommitted
Fix notes appearing on wrong tracks due to virtual scroll recycling
Reset localNotesDisplay when track ID changes to prevent stale notes from a previously edited track showing on other tracks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7934d55 commit 6c3e643

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

client/src/components/TrackItem.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import {
3-
defineComponent, computed, PropType, ref, nextTick,
3+
defineComponent, computed, PropType, ref, nextTick, watch,
44
} from 'vue';
55
import context from 'dive-common/store/context';
66
import TooltipBtn from './TooltipButton.vue';
@@ -89,6 +89,11 @@ export default defineComponent({
8989
const typeInputRef = ref<HTMLInputElement | HTMLSelectElement | null>(null);
9090
const confidenceInputRef = ref<HTMLInputElement | null>(null);
9191
const notesInputRef = ref<HTMLInputElement | null>(null);
92+
93+
// Reset local notes display when track changes (component recycling in virtual scroll)
94+
watch(() => props.track.id, () => {
95+
localNotesDisplay.value = '';
96+
});
9297
/**
9398
* Use of revision is safe because it will only create a
9499
* dependency when track is selected. DO NOT use this computed

0 commit comments

Comments
 (0)