fix: show all presets always, no filter by selection
Remove selection-based filter entirely. Suggestions list stays stable across select/deselect — no preset appears at top when deselecting.
This commit is contained in:
@@ -16181,7 +16181,7 @@ const App = () => {
|
|||||||
aiPromptMgrRef.current = new window.PromptTemplateManager();
|
aiPromptMgrRef.current = new window.PromptTemplateManager();
|
||||||
}
|
}
|
||||||
const promptMgr = aiPromptMgrRef.current;
|
const promptMgr = aiPromptMgrRef.current;
|
||||||
const suggestions = promptMgr ? (hasSelItem ? promptMgr.presets.filter(function(p) { return p.category === 'Rearrange / Variation'; }) : promptMgr.presets) : [];
|
const suggestions = promptMgr ? promptMgr.presets : [];
|
||||||
const handleApplySuggestion = (preset) => {
|
const handleApplySuggestion = (preset) => {
|
||||||
if (hasSelItem) {
|
if (hasSelItem) {
|
||||||
setAiPrompt(`Rearrange this melody line in ${preset.name} style`);
|
setAiPrompt(`Rearrange this melody line in ${preset.name} style`);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -712,3 +712,9 @@
|
|||||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
|
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
|
||||||
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
|
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### [2026-07-29 10:19] Task: Show all presets always, no filter by selection
|
||||||
|
- **Tóm tắt thay đổi:** Luôn hiển thị `promptMgr.presets` đầy đủ, không filter theo selection state — tránh preset đầu tiên nhảy vào list khi bỏ chọn item.
|
||||||
|
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
|
||||||
|
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
|
||||||
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user