Binding select2 element

Hi all comunity,

I’m changing select2 value depending on text input introduced previously via ajax. My problem is how to bind select2 to it’s correspondant property defined on component.

Here is the code:

First Livewire component

class CustomerData extends Component
{
    public $zipcode;
    public $city;
    public $state;

    public function mount($customer_data)
    {
        $this->zipcode = $customer_data->zipcode;
        $this->city = $customer_data->city;
        $this->state = $customer_data->state;
    }

    //Save function wired to button
    public function save($customer_data)
    {
        //Here I want to e.g. dd($this->state)
    }

}

Second function is an ajax call ones. It search on database a value, set correspondant response to select2 city and trigger a change. What I need is set or wire select2 to it’s property defined on