fix: auto-add tracks when drag exceeds track count

Compute maxTargetIdx across all multiIds items. Prepend new
tracks to prev array before mapping if needed.
This commit is contained in:
2026-07-29 11:08:11 +07:00
parent 9abb0e6a50
commit ad6fa1feb9
3 changed files with 24 additions and 1 deletions
+6
View File
@@ -766,3 +766,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:07] Task: Auto-add tracks when drag exceeds existing track count
- **Tóm tắt thay đổi:** Tính `maxTrg` từ tất cả items trong multiIds. Nếu `prev.length <= maxTrg`, tự động thêm track mới vào `prev` trước khi xử lí. Item track2 cần xuống track3 → auto-add track3.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---