Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conditional field does not work in a Flexible Content package layout #17

Open
felixmFlow opened this issue Mar 10, 2023 · 0 comments
Open

Comments

@felixmFlow
Copy link

Hello,
I have a scenario where i'm adding the conditional field in the layout from a package called flexible content but for some reason, it's not working.
here is my code
Flexible::make('custom', 'custom')
->addLayout('', 'wysiwyg', [
Select::make(__('Type'), 'type')
->options([
'opt1' => 'opt1',
'opt2' => 'opt2'
]),

                        KeyValue::make(__('Options'), 'option')
                            ->if(['type'], fn($value) => $value['type'] === 'opt1'),
                        ]),
           ])
           
           The keyValue field always show up and when the select dropdown changes nothing happens to the keyValue field.
           Any assistance is highly appreciated
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant