From 5d9c0bfd96366c6ca2c33a5380e30c30098a1b34 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 15 Jun 2022 13:25:45 +0200 Subject: [PATCH] wip #4210 @0.5 --- resources/views/fields/fluidbook_theme_selector.blade.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/views/fields/fluidbook_theme_selector.blade.php b/resources/views/fields/fluidbook_theme_selector.blade.php index 518f1f332..3b30b80c1 100644 --- a/resources/views/fields/fluidbook_theme_selector.blade.php +++ b/resources/views/fields/fluidbook_theme_selector.blade.php @@ -79,9 +79,13 @@ $(".themeSelector .actions .owner").html(htmlDecode(data.columns.owner)); $(".themeSelector .actions .created_at").html(data.columns.created_at); $(".themeSelector .actions .updated_at").html(data.columns.updated_at); - $('.themeSelector options[value="' + themeID + '"]').each(function () { - $(this).text(data.name + ' (#' + themeID + ')'); + var optName = data.name + ' (#' + themeID + ')'; + $(selector).find('option[value="' + themeID + '"]').each(function () { + $(this).text(optName); + $(selector).trigger('change.select2'); }); + console.log($(selector + ' + .select2 .select2-selection__rendered')); + $(selector + ' + .select2 .select2-selection__rendered').text(optName); } }); } -- 2.39.5