You defined the minimum value for the field to be 0. So it's never going to show you a negative number, remove min="0"
Thank You alen for this tip.
I removed min="0"
but it did not
have any effect. I also removed the
'placeholder' and 'step' entries.
Now I have:
<input name="amount" type="number" value="{{ $invoice->left() }}" class="form-control" wire:model.lazy="values.{{ $invoice->id }}.amount">
The browser´s code inspector shows:
<input name="amount" type="number" value="655.85" class="form-control" wire:model.lazy="values.5705.amount">
The page in the the browser shows an empty input. Somewhere Laravel/Livewire seem to block the value.
Regards
Wayne
wire:model=“someProperty”
will bind the component property $someProperty
to the value a the input field. So if $someProperty
has no value, the input won’t either.
Does $values[5705][‘value’]
have a value?
Maybe initialise $values
in the component class?
2btechdev2 liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community