filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.41k stars 2.87k forks source link

Could not find Livewire component in DOM tree (RichEditor ONLY Simple Resource - Modal) #10810

Closed leoblanski closed 8 months ago

leoblanski commented 9 months ago

Package

filament/filament

Package Version

v3.1.0 / v3.1.47

Laravel Version

v10.39.0 / v10.40.0

Livewire Version

No response

PHP Version

8.2

Problem description

I'm creating a new RichEditor component into form, it works perfectly when I'm using complete resources (With CRUD pages), but for some reason, when using a simple resource, generated simply with php artisan filament:resource TestResource --simple it doesn't work...

Same code in each resource:

public static function form(Form $form): Form
    {
        return $form
            ->schema([
                RichEditor::make('body')
                    ->label('Description')
                    ->required(),
            ]);
    }

Returns: Uncaught Could not find Livewire component in DOM tree on console

test

Expected behavior

I expected a preview image as it works on the complete Resource.

Steps to reproduce

If you do the same thing, but using php artisan filament:resource TestResource --generate it works.

Reproduction repository

https://github.com/leoblanski/filament-upload-image-bug

Relevant log output

No response

danharrin commented 8 months ago

Tried Chrome, Firefox and Safari, and I am unable to reproduce the issue. So I am going to need a better reproduction repository to be able to fix this.

https://github.com/filamentphp/filament/assets/41773797/b47afa88-9cef-438a-b67e-5caf8f66b755

rappasoft commented 8 months ago

I can reproduce this issue on 3.2.10.

I can also confirm it is only on simple resources.

danharrin commented 8 months ago

11004