Closed CodeWithDennis closed 1 year ago
Brief sign of life. I have not forgotten this, but unfortunately have not yet had a chance to look at it. Please still a little patience.
And thanks for the message.
So. a little late, but I checked again everything at the Nova Select field and refactor everything and it works now in both directions.
Thanks!
@Muetze42 Sorry to bother you again but it seems like there is still something going wrong with dependsOn
the options are not changing. When trying the exact same code on the Select field it works.
Radio::make(__('Methode'), 'method')
->options([
'test123' => 'test123',
'test321' => 'test321'
])
->dependsOn(['type'], function (Radio $field, NovaRequest $request, FormData $formData) {
if ($formData->type == 'phone') {
$field->options(['test' => 'test']);
}
})->inline(),
I think we have it now. :D Bit stupid, since dependsOn is not documented. But thanks for your reports.
Select dependsOn
Radio (M/Medium):
Live: https://nova-demo.huth.it/resources/nova-radio-field-radios/2/edit
Source: https://github.com/Muetze42/laravel-nova-demo-app/blob/main/app/Nova/Resources/NovaRadioFieldRadio.php#L111
Radio dependsOn
Select (M/Medium):
Live: https://nova-demo.huth.it/resources/nova-radio-field-radios/3/edit
Source: https://github.com/Muetze42/laravel-nova-demo-app/blob/main/app/Nova/Resources/NovaRadioFieldRadio.php#L146
Change Radio dependsOn
(W/With help texts):
Live: https://nova-demo.huth.it/resources/nova-radio-field-radios/4/edit
Source: https://github.com/Muetze42/laravel-nova-demo-app/blob/main/app/Nova/Resources/NovaRadioFieldRadio.php#L181
Everything from version 1.1.3
Nice! It seems to be working now.
PS: i think the same issue is going for readonly()
but i won't bother you with that since i don't need it.
Oh man. 😠It's on my to-do. But not today. 😄
Oh man. 😠It's on my to-do. But not today. 😄
Haha no worries, i appreciate all the quick fixes you done so far!
In case you need readonly. Now it is available....
It seems like the
Radiofield
is not working when usingdependsOn
on the field it self, thetype
field is also a Radiofield.The field will not show. (added video clip) https://user-images.githubusercontent.com/23448484/235426360-3b4ab5c6-24d0-4400-815f-2e38e0b738fc.mov