Closed afonic closed 6 months ago
It's a first try but it seems to be working and all the tests pass! Lets see!
Should this already be in v1.6.0? I get an error:
Unable to find component: [lf-tags]
You should get v1.8.0, maybe you are kept back by the Statamic version?
Yeah, that seems to have been the issue. I do get an error now:
"Undefined array key 1" (statamic-livewire-filters/src/Http/Livewire/LfTags.php:75)
If I die and dump the value and key on that line is see the result:
"products" // vendor/reachweb/statamic-livewire-filters/src/Http/Livewire/LfTags.php:75
"as" // vendor/reachweb/statamic-livewire-filters/src/Http/Livewire/LfTags.php:75
I re-open this because it looks like a bug. It seems something gets passed as a parameter that shouldn't. Probably something like as="products"
?
Can you show me your livewire-collection
tag and your LfTags
tag?
Sure, here you go:
{{
livewire-collection:products
paginate="12" as="products"
:blueprint:is="'product_variants_vaste-planten'"
}}
{{ livewire:lf-tags blueprint="products.product_variants_vaste-planten" fields="categorieen|bloemkleur" }}
Update: if I remove as="products" it works. Don't remember why I added this to the original collection query but I don't think I need this anymore.
Update 2: it does show tags that are not specified in fields (like groenblijvend en the blueprint): [
](url)
Yeah the as="products"
is not really needed in the tag, I will add some filters for unsupported tags.
The :blueprint:is="'product_variants_vaste-planten'"
also needs to be fixed the same way.
It should display all the labels of the fields categorieen|bloemkleur
correctly, do you mind sharing the filters you gave active?
Yeah it does show categorieen and bloemkleur so that's good. But it also shows groenblijvend which IS a working filter but is not a part of the fields specified in the lf-tags tag. So I would expect it to not show up as a tag.
Yeah you are right, I will fix this at my side.
Why are they all lowercase? If it was loading them correctly they should be Categorieen: Siergrassen
it should take the display
value of the field and the title
of the tag or label
of another field and fallback only if it cannot find them.
Try v1.8.1 when you have a chance.
Fixed! Nice! Also tags show in Title case now.
Good to hear!
You did it? Very nice. Gonna try it next week.