awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
324 stars 86 forks source link

CuratorPicker can't be placed within a Group within a Grid anymore #355

Closed Voltra closed 10 months ago

Voltra commented 10 months ago

Filament Version

3.0.102

Plugin Version

3.1.4

PHP Version

8.1.0

Problem description

In one of my block's schema for filament-fabricator, I had put the picker within group that was within a grid (for layout and customization purposes). It used to work just fine, but after updating my dependencies yesterday it now causes an infinite loop

Expected behavior

It should work fine, as it used to

Steps to reproduce

Rewrite a component of an existing app with existing data, and place the CuratorPicker inside a Group and put that Group into a Section.

Might have to put all that within a Block as that's what filament-fabricator uses

Reproduction repository

No response

Relevant log output

No response

Voltra commented 10 months ago

After another test, I can confirm the issue only happens when there's a value for that field. When the field is empty and we pick an image it works fine, but refreshing the page after saving triggers the issue

awcodes commented 10 months ago

Sorry. I can't replicate the issue, and can't speak for anything that might be related to issues with the Fabricator plugin. If you can provided a reproduction repo, I can look into it more.

Forms\Components\Section::make('Section')
    ->schema([
        Forms\Components\Group::make([
            CuratorPicker::make('featured_image_id')
                ->relationship('featured_image', 'id'),
        ])
    ]),

Screenshot 2023-11-27 at 10 49 43 AM

Voltra commented 10 months ago

I have indeed tried myself to make reproduction repo, but failed for now. It's probably a third-party compatibility issue, or an issue on another dependency completely. I'll close this issue for now