Update RichEditor based on other field
I would like to pre-populate a RichEditor field if another field changes:
But it does not work. It works with a plain TextInput. What I'm doing wrong?
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.