Skip to content

Commit

Permalink
Merge pull request #1596 from MaxJa4/improvement/select_amount
Browse files Browse the repository at this point in the history
Auto selects amount of ingredient when adding new ingredient.
  • Loading branch information
vabene1111 authored Mar 1, 2022
2 parents 6b430ab + 429d381 commit b730acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vue/src/apps/RecipeEditView/RecipeEditView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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") }))) {
Expand Down
3 changes: 2 additions & 1 deletion vue/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit b730acc

Please sign in to comment.