Edit Action unexpected character

I have a table with an edit action.
                EditAction::make('edit')
                    ->label('Rename')
                    ->modalHeading('Rename Key')
                    ->modalWidth('sm')
                    // ->form([
                    //     Forms\Components\TextInput::make('name')
                    //         ->label('Name')
                    //         ->required()
                    //         ->default(function ($record) {
                    //             return $record->name;
                    //         })
                    // ])
                    ->action(function (array $data, $record) {
                        $record->update($data);
                        $this->service->sendNotification(
                            title: 'Successfully renamed key.',
                            success: true
                        );
                    }),


This opens the modal, but as soon as I uncomment the form, I get an error saying:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data


And my table:
        return $table
            ->query(Passkey::where('user_id', $this->user->getKey()))
Was this page helpful?