Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting $record when using widget in a resource #209

Open
jigar-dhulla opened this issue Jul 31, 2024 · 5 comments
Open

Conflicting $record when using widget in a resource #209

jigar-dhulla opened this issue Jul 31, 2024 · 5 comments

Comments

@jigar-dhulla
Copy link

I am trying to use this widget in a resource and $record property in InteractsWithRecords trait is conflicting with the resource record.

Our fetchEvents() implementation to fetch the events uses $this->record which populates the resource record correctly in the beginning. But when we click on any event, value of $this->record is overwritten by Event record.

I see a change was made in #41 , but it seems that was for an older version.

@jigar-dhulla jigar-dhulla changed the title Conflicting $record when used widget in a resource Conflicting $record when using widget in a resource Jul 31, 2024
@PrasadChinwal
Copy link

Facing the same issue.

@saade
Copy link
Owner

saade commented Aug 9, 2024

Yes, unfortunately this is a know issue. I'm rewriting this implementation for v4

@PrasadChinwal
Copy link

@saade Do we have a workaround to not throw the error?

@kamilst96
Copy link

kamilst96 commented Aug 26, 2024

Can't actively vouch for it, but this is my current workaround.

Install composer package:
composer require cweagans/composer-patches

Add in composer.json:

"extra": {
        "patches": {
            "saade/filament-fullcalendar": {
                "Fix conflicting record": "https://github.com/kamilst96/filament-fullcalendar/commit/222533e69c154aa34e622122280b080ce50ce854.patch"
            }
        }
    },

The general idea is to replace references to ->record with ->eventRecord.

EDIT: I somehow smuggled laravel/pint into composer.json. It should pose no problem, but it was an accident.

@LuciusAB
Copy link

Also have this issue. Would be highly appreciated if it's possible to get it fixed, might be a while until V4 gets out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants