From df8172070a8d44d21170709c939802795ba59506 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Mon, 30 Mar 2026 14:08:58 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20TomSelect=20addOption=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B6=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ this.addOption(item) для каждой группы из API ✅ Опции теперь доступны в this.options Co-authored-by: Qwen-Coder --- resources/views/components/tags-input.blade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/views/components/tags-input.blade.php b/resources/views/components/tags-input.blade.php index 821497a..cf472e1 100644 --- a/resources/views/components/tags-input.blade.php +++ b/resources/views/components/tags-input.blade.php @@ -77,6 +77,10 @@ document.addEventListener('DOMContentLoaded', function() { .then(json => { // Фильтруем уже выбранные const filtered = json.filter(item => !selectedTags.has(String(item.id))); + // Добавляем опции в TomSelect + filtered.forEach(item => { + this.addOption(item); + }); callback(filtered); }).catch(() => { callback();