Closed babist closed 1 year ago
Hello @babist It's the expected behavior. You must use the option label and value together. The option-key-value is only for an array of primitive values, like string, number...
I do not understand why option-key-value should only be used with primitive values. Please take a look at my case:
I have this array in my app's config:
[
// ...
'statuses' => [
'confirmed' => [
'label' => 'Confirmed',
],
'awaiting_payment' => [
'label' => 'Awaiting Payment',
],
'paid' => [
'label' => 'Paid',
'warning' => 'Some warning...',
],
'shipped' => [
'label' => 'Shipped',
'warning' => 'Another warning',
],
],
]
The options' values need to be the keys of the statuses
array, but their label should be the label
key of each element.
@babist Interesting...
Is this going to be fixed? Should I try to create a PR?
PS. sorry for the late response, I was on holiday.
@babist it's going to be released today. I was fixing a performance issue before fix it
Wow, already?! That's awesome, thanks!
@babist Thanks for changing my opinion about that. You're right, thanks.
Update to the latest release to see the changes
Yaay! Thanks for the update!
Describe the bug I cannot use
option-key-value
anymore in selects.To Reproduce Steps to reproduce the behavior:
<x-select>
:option-key-value="true"
option-value
option-label
To Solve Fix
validateConfig()
inNativeSelect.php
to takeoption-key-value
into account.