fix comment reset

This commit is contained in:
2023-12-18 16:35:41 +03:00
parent 32ddb3a05e
commit e9ee11eec0
2 changed files with 3 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ class Create extends Component
$comment->plan_id = $this->plan->id;
$comment->user_id = $this->user->id;
$comment->save();
$this->reset(['body']);
$this->reset();
$this->toggle();

View File

@@ -18,8 +18,9 @@
<input @class(['star-rating__input', 'hidden' => $isChecked]) wire:model="isChecked" wire:click="$set('grade',1)" type="radio"
name="rate" id="rate-1" value="1" hidden>
<label class="star-rating__label" for="rate-1"></label>
<input wire:model="isChecked" wire:click="$set('grade',0)" type="radio" name="rate" id="rate-0" value="1" hidden>
</div>
<button wire:click="save" type="button" class="btn btn-primary">Оставь отзыв</button>
<button wire:click.prevent="save" type="button" class="btn btn-primary">Оставь отзыв</button>
</div>