Stillat / antlers-components

Makes it easy to integrate Blade and Livewire components into an Antlers template, and create isolated, reusable Antlers components utilizing partials.
MIT License
24 stars 0 forks source link

Flux select variants not rendering correctly #10

Open EncoreTaylor opened 1 week ago

EncoreTaylor commented 1 week ago

Not sure whether this would go in this repo or in Statamic Livewire, please let me know!

Two things that I've noticed:

  1. ui-options aren't rendering correctly
  2. The clearable option isn't working/rendering

Here's the code I'm trying to run

<flux:select wire:model.live="category" variant="listbox" placeholder="Choose category..." clearable>
    <flux:option value="conference">Conference</flux:option>
    <flux:option value="webinar">Webinar</flux:option>
    <flux:option value="course">Course</flux:option>
    <flux:option value="workshop">Workshop</flux:option>
</flux:select>

Hooked up inside a blank Laravel app (Works fine)

Screenshot 2024-11-14 at 10 24 59 AM

Screenshot 2024-11-14 at 10 27 55 AM

Hooked up in a Statamic app using Antlers (not rendering ui-options)

Screenshot 2024-11-14 at 10 24 51 AM

Screenshot 2024-11-14 at 10 27 32 AM

JohnathonKoster commented 1 week ago

This is due to the options not picking up on the variant="listbox" on the parent. Due to how this is implemented with this library, I'm not sure of a simple/easy way to solve this (since that relies on Blade component behavior, and this works to shim in some of the behaviors in Antlers - but not all of them are easily re-implementable here).

I'll do some thinking, though, but might be easier to move that to Blade for now 👍