Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default selected value not working #867

Open
ffaouzif opened this issue Feb 25, 2024 · 1 comment
Open

Default selected value not working #867

ffaouzif opened this issue Feb 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ffaouzif
Copy link

ffaouzif commented Feb 25, 2024

Describe the bug
A select component does not display selected values from livewire model component.
And not make any change to the binded property.

View :

<x-select placeholder="Guard" :options="['Web', 'API']" wire:model="guard_name"  />

Component :

<?php

namespace App\Http\Livewire;
use Livewire\Component;

class Edit extends Component
{
    public $guard_name = "Web";

    public function render()
    {
        return view('livewire.edit');
    }
}

Expected behavior
It should select "Web" option, but it does not.

Capture d’écran du 2024-02-25 02-21-19

Capture d’écran du 2024-02-25 02-22-13-2

Dependencies

  • WireUI Version: 2.X.X
  • Laravel Version: 10.X.X
  • Livewire Version: 3.X.X
@ffaouzif ffaouzif added the bug Something isn't working label Feb 25, 2024
@vlados
Copy link
Contributor

vlados commented Mar 12, 2024

Any ideas why this bug occur? Possible solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants