Debounce / Lazy on Markdown Field not working

I've created a markdown field with the following settings:
Forms\Components\Markdown::make('question')
->default('Question?')
->reactive()
->lazy()
->afterStateupdated(function ($state) {
Debugbar::log($state);
}),
Forms\Components\Markdown::make('question')
->default('Question?')
->reactive()
->lazy()
->afterStateupdated(function ($state) {
Debugbar::log($state);
}),
The lazy() option does not appear to have any effect and causes the field to become basically unusable since it updates constantly while you're typing. However, if I switch this field to be a standard TextArea field like this:
Forms\Components\Textarea::make('question')
->default('Question?')
->reactive()
->lazy()
->afterStateupdated(function ($state) {
Debugbar::log($state);
}),
Forms\Components\Textarea::make('question')
->default('Question?')
->reactive()
->lazy()
->afterStateupdated(function ($state) {
Debugbar::log($state);
}),
The lazy() option works as expected and the field isn't updated until the field loses focus.
1 Reply
Dan Harrin
Dan Harrin2y ago
yeah i dont believe we have those options atm for the md editor only the traditional html elements like textinput and textarea
Want results from more Discord servers?
Add your server