laravel-form-components icon indicating copy to clipboard operation
laravel-form-components copied to clipboard

Livewire Reset Form - Custom Select

Open joserick opened this issue 2 years ago • 1 comments

Laravel Form Components Version

V8.1.4

Laravel Version

v10.21.0

Alpine Version

v3.13.0

Bug description

Hi,

I have a Livewire component which renders a view through a "Modal" where a "Custom Select" is located, this works correctly, but when I send the form, I execute the Livewire "Reset" method, which correctly cleans the form except the "Custom Select", this does not clean the select when the value is empy.

Component Livewire:

   public string $name = "";
   // ...
    public function addNewElement() : void {
        $this->reset('name');
        // $this->show_modal = false;
    }

View:

<x-form-group :label="__('Name')" name="name">
    <x-custom-select name="name" wire:model="name" optional
        :options="$elements" :placeholder="__('Select a element')" required/>
</x-form-group>

Steps to reproduce

No response

Relevant log output

No response

joserick avatar Sep 07 '23 10:09 joserick

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 28 '23 12:09 github-actions[bot]