Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DependsOn not work #29

Open
webard opened this issue Jul 8, 2024 · 1 comment
Open

DependsOn not work #29

webard opened this issue Jul 8, 2024 · 1 comment

Comments

@webard
Copy link

webard commented Jul 8, 2024

Hello,

I have code:

Select::make('Template', 'template2')
                ->options([
                    '1' => 'Template 1',
                    '2' => 'Template 2',
                ]),

                TinymceEditor::make('Notes', 'notes')
                    ->fullWidth()
                    ->rules('required')
                    ->dependsOn('template2', function (TinymceEditor $field, NovaRequest $request, FormData $formData) {
                        $tpl = $formData->get('template');
                            $field->value = ('<h1>Template '.$tpl.'</h1>');
                    })

but changing Template does not result changing content of Tinymce editor. Instead of, dependsOn looks like run on refresh button.

@jaycom
Copy link

jaycom commented Dec 24, 2024

I also has the same issue.
Uncaught (in promise) TypeError: t is undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants