livewire / flux

The official Livewire UI component library
https://fluxui.dev
485 stars 42 forks source link

select variant listbox adds an extra comma after placeholder #686

Closed yangsystem closed 6 days ago

yangsystem commented 1 week ago

Latest flux, latest livewire, tailwind from cdn.

    <flux:select variant="listbox" searchable placeholder="Choose industries...">
        <flux:option>Photography</flux:option>
        <flux:option>Design services</flux:option>
    </flux:select>
    <flux:select placeholder="Choose industries...">
        <flux:option>Photography</flux:option>
        <flux:option>Design services</flux:option>
    </flux:select>

Image

jeffchown commented 1 week ago

@yangsystem Copying your exact code, I do not get a comma. Have you checked the far-right section of each line of your code? Maybe there is a stray comma at the end of one of the lines.

jeffchown commented 1 week ago

Or maybe you published the Flux select component and edited the list box variant file? (flux\select\variants\listbox.blade.php)

yangsystem commented 1 week ago

Nope, I tend to not publish anything.(just use them as is.) And yes the code is copy paste from my test file.

I have php 8.3.6 (should no matter) chrome 131.0.6778.70 (should no matter) / edge 131.0.2903.48 (should no matter) laravel/framework 11.32 livewire/flux-pro 1.0.23 livewire/livewire 3.5.12

as you can see the comma appears only to the variant="listbox" with or without searchable

jeffchown commented 1 week ago

@yangsystem I see it in your screenshot (the comma), but when I copy/paste your code example, I do not get a comma in my test app in either of the selects.

yangsystem commented 1 week ago

I have just published the component php artisan flux:publish and selected select and the comma disappeared, then I deleted the published files reloaded the page and the comma appeared.

Image

jeffchown commented 1 week ago

@yangsystem Strange... Did you run php artisan view:clear then npm run build after deleting the published files?

yangsystem commented 6 days ago

php artisan view:clear Fixed the problem. 10Q