mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-19 05:09:40 +02:00
fix: recipe ingredient editor bugs (#1251)
* filter unallowed fields #1140 * fix type and layout * propery validate none type quantites * fix rendering error #1237
This commit is contained in:
parent
d06d4d2fd9
commit
cd0da36e7c
5 changed files with 47 additions and 22 deletions
|
@ -20,6 +20,7 @@
|
|||
class="mx-1"
|
||||
type="number"
|
||||
placeholder="Quantity"
|
||||
@keypress="quantityFilter"
|
||||
>
|
||||
<v-icon v-if="$listeners && $listeners.delete" slot="prepend" class="mr-n1 handle">
|
||||
{{ $globals.icons.arrowUpDown }}
|
||||
|
@ -166,7 +167,7 @@ export default defineComponent({
|
|||
if (state.showTitle) {
|
||||
value.title = "";
|
||||
}
|
||||
state.showTitle = !state.showTitle
|
||||
state.showTitle = !state.showTitle;
|
||||
}
|
||||
|
||||
function toggleOriginalText() {
|
||||
|
@ -211,7 +212,15 @@ export default defineComponent({
|
|||
return options;
|
||||
});
|
||||
|
||||
function quantityFilter(e: KeyboardEvent) {
|
||||
// if digit is pressed, add to quantity
|
||||
if (e.key === "-" || e.key === "+" || e.key === "e") {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
quantityFilter,
|
||||
toggleOriginalText,
|
||||
contextMenuOptions,
|
||||
handleUnitEnter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue