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.28k stars 2.96k forks source link

Relationmanager tabs not working anymore #8517

Closed francoism90 closed 1 year ago

francoism90 commented 1 year ago

Package

filament/filament

Package Version

v3.0.50

Laravel Version

v10.23.1

Livewire Version

v3.0.4

PHP Version

8.2.6

Problem description

After upgrading to v3.0.50, the tabs stop working.

I cannot click on another relationship, it simply keeps pointing at the same tab. I'm using session save, maybe this is the problem?

Expected behavior

Tabs/relationmanagers working, as seen in =<3.0.48

Steps to reproduce

  1. Upgrade to latest version
  2. Try to open a relationmanager (e.g. MediaRelationManager)

Reproduction repository

https://github.com/francoism90/hub-api

Relevant log output

It appends `?activeRelationManager=0` on the URL, even when I just clicked on a different relation.
francoism90 commented 1 year ago

So I noticed, this seems to happen before the upgrade:

activeRelationManager=null <-- first tab
activeRelationManager=0 <-- opening relationmanager

On the latest upgrade it keeps 0 as value.

danharrin commented 1 year ago

Which page of your repository am I looking at, its huge

danharrin commented 1 year ago

That VideoResource only has one relation manager, I'm unsure of the problem you're reporting

francoism90 commented 1 year ago

@danharrin Oh sorry, Filement is in https://github.com/francoism90/hub-api/tree/main/src/App/Admin

After checking the commits, this revert seems to fix the issue:

:active-manager="$activeRelationManager"

See https://github.com/filamentphp/filament/pull/8495/files

francoism90 commented 1 year ago

@danharrin Yeah, I cannot even open that one.

I do have this: https://github.com/francoism90/hub-api/blob/176f89ab67f5e8455c148eaf87d97e6cb4676071/src/App/Admin/Resources/VideoResource/Pages/EditVideo.php#L68

lamberttraccard commented 1 year ago

Same problem here 😞

danharrin commented 1 year ago

Fixed by #8519.

lamberttraccard commented 1 year ago

With the hasCombinedRelationManagerTabsWithContent set to true, I cannot go the edit form anymore

image
francoism90 commented 1 year ago

@danharrin Just a confirmation it now works fine again!

Thanks again, great weekend.