Closed Vuorenheimo closed 3 weeks ago
This happens to me also (running Laravel 10, statamic 5, newest version of this package).
Fixed by changing the line to
return collect($options)
->mapWithKeys(fn ($value) => [$value['key'] => __($value['value'] ?? $value['key']) ])
->toArray();
Looks like this bug was introduced with https://github.com/statamic/cms/pull/10336 in Statamic v5.21.0. I'll release a fix shortly.
Hello!
While using this extension, I noticed that when adding select field to form blueprint, I get mentioned error while rendering form in view.
Steps to Reproduce
{{ livewire:form handle="{ form_name }" }}
Possible Solution
I think error is caused in WithOptions trait where mapWithKeys callback returns an associative array and array of options is passed as key to array.
Context (Environment)
Happens on fresh install of Laravel 11.
Anyway, thank you for this extension. Livewire for the win!