fix: targetTrackId undefined outside updateActiveTracks closure

Move track Y-position computation before updateActiveTracks so
targetTrackId is accessible for setDraggedSectionItem update.
This commit is contained in:
2026-07-29 11:09:05 +07:00
parent ad6fa1feb9
commit 0d763c5a0b
3 changed files with 24 additions and 15 deletions
+6
View File
@@ -772,3 +772,9 @@
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-29 11:10] Task: Fix targetTrackId undefined outside closure
- **Tóm tắt thay đổi:** Chuyển target track computation ra ngoài `updateActiveTracks` callback để `setDraggedSectionItem` thấy `targetTrackId`. Compute dùng `activeTracksRef` cho track heights.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---