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
19.39k stars 2.97k forks source link

Issue with `$incrementing` on `MorphPivot` #14845

Open wbpols opened 2 days ago

wbpols commented 2 days ago

Package

filament/filament

Package Version

v3.2.124

Laravel Version

v10.48.23

Livewire Version

v3.5.12

PHP Version

PHP 8.3.9

Problem description

I have a general ContactsRelationManager that is being used by multiple entities (e.g. Customer, Prospect, etc.), this is to prevent having to maintain multiple relation managers that do the same thing (DRY). When setting the $incrementing value to true on a MorphPivot model, I am unable to do any actions on the Filament table rows (view, edit, delete). When setting this value to false, the actions work as expected.

Expected behavior

I expect that when clicking on the row, or on any actions on that row, it will execute the same logic as all other tables do.

Steps to reproduce

  1. Run php artisan migrate --seed;
  2. Goto /admin and login with test@example.com + password;
  3. Open any entity on /admin/customers or admin/prospects;
  4. Click on the entity table row;
  5. Click on any Contact table row, nothing will happen;
  6. Set the $incrementing on /App/Models/ContactEntity to false;
  7. Click again, now it will work;

Reproduction repository (issue will be closed if this is not valid)

https://github.com/wbpols/morphToManyTest

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar