When using Infolist sections (or even forms) and adding the hiddenWhenAllChildComponentsHidden() call, the system goes into infinite recursion. This is because the steps are:
register a hidden() closure
call getChildComponentContainers()
then it check hasChildComponentContainer($withHidden))
since $withHidden is by default false, it calls ->hidden() again, which evaluates the closure itself, resulting in an infinite loop.
Not sure if the fix is simply calling getChildComponentContainers(withHidden: true) or if that has some other implications.
Expected behavior
It should not go in infinite loop.
Steps to reproduce
Create a section
Add 3 TextEntry within it, and mark them as hidden when the state is empty
add hiddenWhenAllChildComponentsHidden to the section
load the page
Reproduction repository (issue will be closed if this is not valid)
Package
filament/infolists
Package Version
v3.2.92
Laravel Version
v11.13.0
Livewire Version
v3.5.1
PHP Version
v8.3.2
Problem description
When using Infolist sections (or even forms) and adding the
hiddenWhenAllChildComponentsHidden()
call, the system goes into infinite recursion. This is because the steps are:hidden()
closuregetChildComponentContainers()
hasChildComponentContainer($withHidden))
$withHidden
is by defaultfalse
, it calls->hidden()
again, which evaluates the closure itself, resulting in an infinite loop.Not sure if the fix is simply calling
getChildComponentContainers(withHidden: true)
or if that has some other implications.Expected behavior
It should not go in infinite loop.
Steps to reproduce
hiddenWhenAllChildComponentsHidden
to the sectionReproduction repository (issue will be closed if this is not valid)
https://github.com/Skullbock/filament-issue-hidden
Relevant log output
No response
Donate 💰 to fund this issue