Streamline bootstrap-combobox clear handling (this now closes #2942)

This commit is contained in:
Bernd Bestel 2026-08-16 20:10:19 +02:00
parent b3fbb387ca
commit d2b8d55803
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 4 additions and 4 deletions

View File

@ -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('');

View File

@ -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');

View File

@ -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();

View File

@ -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")