Fixed habit- and batterytracking dropdowns - selection did not work

This commit is contained in:
Bernd Bestel 2018-07-22 09:54:06 +02:00
parent 70dbc6018f
commit 9bedc6a138
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 8 additions and 2 deletions

View File

@ -35,8 +35,11 @@
$('#battery_id').on('change', function(e) $('#battery_id').on('change', function(e)
{ {
var batteryId = $(e.target).val(); var input = $('#battery_id_text_input').val().toString();
$('#battery_id_text_input').val(input);
$('#battery_id').data('combobox').refresh();
var batteryId = $(e.target).val();
if (batteryId) if (batteryId)
{ {
Grocy.Components.BatteryCard.Refresh(batteryId); Grocy.Components.BatteryCard.Refresh(batteryId);

View File

@ -34,8 +34,11 @@
$('#habit_id').on('change', function(e) $('#habit_id').on('change', function(e)
{ {
var habitId = $(e.target).val(); var input = $('#habit_id_text_input').val().toString();
$('#habit_id_text_input').val(input);
$('#habit_id').data('combobox').refresh();
var habitId = $(e.target).val();
if (habitId) if (habitId)
{ {
Grocy.Components.HabitCard.Refresh(habitId); Grocy.Components.HabitCard.Refresh(habitId);