Update RichEditor based on other field

I would like to pre-populate a RichEditor field if another field changes: TextInput::make('Prompt') ->label(__('AI Assistant')) ->afterStateUpdated(function (Set $set,) { $set('content', 'Foobar'); }) ->live(onBlur: 500) ->columnSpan(2), RichEditor::make('content') ->required() ->columnSpanFull(), But it does not work. It works with a plain TextInput. What I'm doing wrong?
Solution:
@rolandbarkoczi Can you check again, The same code is working on my machine, and click outside the input field after you have finished typing in Prompt field.
Jump to solution
2 Replies
Solution
pratik
pratik7mo ago
@rolandbarkoczi Can you check again, The same code is working on my machine, and click outside the input field after you have finished typing in Prompt field.
Roland Barkóczi
Roland BarkócziOP7mo ago
thanks for checking! I was played a little bit. The problem occurs in that case when the richtext is just after the text field, and you hit TAB on the text field. in this case, the richtext will be focused and its value won't be updated
Want results from more Discord servers?
Add your server