F
Filament9mo ago
Epko

TextArea with autosize resets to default size with Live event.

Before I report this as a bug, I'd like to know if this is expected behaviour. I have a very simple form (just to reproduce the problem):
return $form
->schema([
Forms\Components\Textarea::make('test')
->rows(2)
->autosize()
->live(onBlur: true),
]);
return $form
->schema([
Forms\Components\Textarea::make('test')
->rows(2)
->autosize()
->live(onBlur: true),
]);
When the form loads, the Textarea is autosized perfectly, containing the needed lines of text (for example 10). But as soon as the live event is triggered (by leaving the Textarea) the Textarea is reset to the default 2 rows. So the autosize setting is not respected anymore. If I then try to resize the browser window, the autosize setting is immediately applied again. It does not matter if I set rows or not (not setting is the same as rows(1)) and it does not matter if I use a different live() setting. As said, before I issue a bug report, I'd like to know if this is expected behaviour, and maybe there is a quick fix. It does sound a bit like https://github.com/filamentphp/filament/issues/7620 but it is not the same.
GitHub
Textarea autosize doesn't work on page load & after resource save ·...
Package filament/filament Package Version v3.0.15 Laravel Version v10.18.0 Livewire Version v3.0-beta PHP Version PHP 8.1.7 Problem description Textarea auto sizing works only when you write some t...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server