No data on textarea, input and select on modal when update or view

I have same issue with this https://github.com/filamentphp/filament/discussions/13488 The case is in my local it's ok but on prod there is no data and got error
Uncaught ReferenceError: state is not defined
Uncaught ReferenceError: state is not defined
How to fix this when you want to use view action or even custom action either of the two is not working on prod and even local from another dev
Tables\Actions\ViewAction::make()
->color('primary'),

or

Action::make('view_form')
->label('View Report')
->modalHeading('Report Details')
->form(fn ($record) => [
Forms\Components\Textarea::make('reason')
->label('Reason')
->readOnly()
->default($record->reason),
Forms\Components\Select::make('status')
->label('Status')
->disabled()
->options(Status::adminActions())
->default($record->status),
Forms\Components\Textarea::make('remarks')
->label('Remarks')
->readOnly()
->default($record->remarks),
])
->action(function (array $data): void {
})
->color('primary')
->icon('heroicon-o-eye'),
Tables\Actions\ViewAction::make()
->color('primary'),

or

Action::make('view_form')
->label('View Report')
->modalHeading('Report Details')
->form(fn ($record) => [
Forms\Components\Textarea::make('reason')
->label('Reason')
->readOnly()
->default($record->reason),
Forms\Components\Select::make('status')
->label('Status')
->disabled()
->options(Status::adminActions())
->default($record->status),
Forms\Components\Textarea::make('remarks')
->label('Remarks')
->readOnly()
->default($record->remarks),
])
->action(function (array $data): void {
})
->color('primary')
->icon('heroicon-o-eye'),
GitHub
Custom page textarea vs textinput bug · filamentphp filament · Disc...
Package Form builder Package Version v3.2* How can we help you? Upon update to filament latest, the textarea in my custom page stopped passing the entered value. The same form in a filament resourc...
Solution:
Ohh.... I solved it by just upgrading the filament version and composer install
Jump to solution
3 Replies
awcodes
awcodes2d ago
Sounds like you’re depending on a relationship but not actually using relationship fields meaning that the relationship isn’t actually getting loaded.
Jerome V
Jerome VOP2d ago
No relationship here sir.. I just want to show the details of the report based on the data in the database this is the form public static function form(Form $form): Form { return $form ->schema([ Forms\Components\Textarea::make('reason') ->readOnly() ->columnSpanFull(), Forms\Components\Select::make('status') ->required() ->columnSpanFull() ->options(Status::adminActions()), Forms\Components\Textarea::make('remarks') ->columnSpanFull(), ]); } So in my list I want to show (view) the data of that specific id
Solution
Jerome V
Jerome V2d ago
Ohh.... I solved it by just upgrading the filament version and composer install
Want results from more Discord servers?
Add your server