Having a small issue trying to clear a textarea of its content after a reply has been submitted.
Ive tried:
$this->reset('reply');
$this->reply = ''
$this->reply = null
$this->reply = 'Im gonna headbutt the screen if you dont disappear'
Here’s the full contents of the function:
$this->validate();
# Reply
Posts::create([
'userID' => Auth::user()->id,
'threadID' => $this->threadID,
'description' => $this->reply,
]);
# Close Form
$this->showReply = false;
# Update The Component
$this->emitSelf('refreshPosts');
# Display Toast
$this->dispatchBrowserEvent('toast', [
'message' => 'Reply posted.',
'type' => 'success',
]);
# Empty Reply Field (Or try anyway LOL)
$this->reset('reply');
PS: I didnt try the last one but I feel like I’m gonna try it shortly