From d2b8d55803e82adb20dc7f22d2ce630b39300b23 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sun, 16 Aug 2026 20:10:19 +0200 Subject: [PATCH] Streamline bootstrap-combobox clear handling (this now closes #2942) --- public/viewjs/batterytracking.js | 2 +- public/viewjs/choretracking.js | 2 +- public/viewjs/components/productpicker.js | 2 +- public/viewjs/components/recipepicker.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/viewjs/batterytracking.js b/public/viewjs/batterytracking.js index 6ea8cbf8..466440d3 100644 --- a/public/viewjs/batterytracking.js +++ b/public/viewjs/batterytracking.js @@ -71,7 +71,7 @@ $('#battery_id').on('change', function (e) } }); -$(".combobox").combobox(Object.assign(BootstrapComboboxDefaults, { "clearIfNoMatch": false })); +$(".combobox").combobox(BootstrapComboboxDefaults); $('#battery_id').val(''); $('#battery_id_text_input').val(''); diff --git a/public/viewjs/choretracking.js b/public/viewjs/choretracking.js index 81f6f155..af5ea378 100644 --- a/public/viewjs/choretracking.js +++ b/public/viewjs/choretracking.js @@ -105,7 +105,7 @@ $('#chore_id').on('change', function (e) } }); -$(".combobox").combobox(Object.assign(BootstrapComboboxDefaults, { "clearIfNoMatch": false })); +$(".combobox").combobox(BootstrapComboboxDefaults); $('#chore_id_text_input').trigger('change'); Grocy.Components.DateTimePicker.GetInputElement().trigger('input'); diff --git a/public/viewjs/components/productpicker.js b/public/viewjs/components/productpicker.js index 6106ff83..c5266c26 100644 --- a/public/viewjs/components/productpicker.js +++ b/public/viewjs/components/productpicker.js @@ -88,7 +88,7 @@ Grocy.Components.ProductPicker.Enable = function () $("#camerabarcodescanner-start-button").removeClass("disabled"); } -$(".product-combobox").combobox(Object.assign(BootstrapComboboxDefaults, { "clearIfNoMatch": false })); +$(".product-combobox").combobox(BootstrapComboboxDefaults); var prefillProduct = GetUriParam('product-name'); var prefillProduct2 = Grocy.Components.ProductPicker.GetPicker().parent().data('prefill-by-name').toString(); diff --git a/public/viewjs/components/recipepicker.js b/public/viewjs/components/recipepicker.js index 5be42c17..e3226825 100644 --- a/public/viewjs/components/recipepicker.js +++ b/public/viewjs/components/recipepicker.js @@ -34,7 +34,7 @@ Grocy.Components.RecipePicker.Clear = function () Grocy.Components.RecipePicker.SetId(null); } -$(".recipe-combobox").combobox(Object.assign(BootstrapComboboxDefaults, { "clearIfNoMatch": false })); +$(".recipe-combobox").combobox(BootstrapComboboxDefaults); var prefillByName = Grocy.Components.RecipePicker.GetPicker().parent().data('prefill-by-name').toString(); if (typeof prefillByName !== "undefined")