I have these two input radio:
<input wire:model="old" wire:change="switchAddress" value="old" @if($old) checked @endif type="radio">
<input wire:model="old" wire:change="switchAddress" value="new" @if(!$old) checked @endif type="radio">
first one to show the specific inputs and second to show another inputs I did like so:
@if ($old)
<input type="number">
//there is aonther inputs
@else
<input type="text">
//there is aonther inputs
@endif
my Component:
public $old = true;
public function switchAddress()
{
if($this->old == 'old'){
return $this->old = true;
}
return $this->old = false;
}
everything is worked but when I click on any input it does not checked the input and keep the input unchecked !