Merge pull request #1596 from MaxJa4/improvement/select_amount

Auto selects amount of ingredient when adding new ingredient.
This commit is contained in:
vabene1111
2022-03-01 15:52:10 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@ -802,7 +802,7 @@ export default {
no_amount: false,
})
this.sortIngredients(step)
this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).focus())
this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).select())
},
removeIngredient: function (step, ingredient) {
if (confirm(this.$t("confirm_delete", { object: this.$t("Ingredient") }))) {

View File

@ -335,5 +335,6 @@
"sort_by": "Sortiere nach",
"Random Recipes": "Zufällige Rezepte",
"recipe_filter": "Rezept-Filter",
"parameter_count": "Parameter {count}"
"parameter_count": "Parameter {count}",
"paste_ingredients": "Zutaten einfügen"
}