reachweb / statamic-livewire-filters

Other
11 stars 0 forks source link

Add support for `entries` fields #27

Open afonic opened 4 months ago

afonic commented 4 months ago

Right now if you want to filter a collection by an entries field, there are no filter options loaded.

You can populate the options manually like so:

{{ collection:pillows as="items" }}
{{? $pillows = $items->flatMap(fn ($item) => [$item->id() => $item->title])->all(); ?}}
{{ /collection:pillows }}
{{ livewire:lf-select-filter
    blueprint="rooms.rooms"
    condition="query_scope"
    modifier="multiselect"
    field="pillows"
    options="{{ $pillows }}"
}}

To close this:

j3ll3yfi5h commented 3 months ago

Please add support for the entries fieldtype 🙏

afonic commented 3 months ago

It's coming soon!

afonic commented 3 months ago

@j3ll3yfi5h I also added the code example above in case you need it asap.

j3ll3yfi5h commented 3 months ago

@afonic thank you 🙇🏼