aidzis
aidzis
FFilament
Created by aidzis on 4/18/2024 in #❓┊help
Section with reactive fields forces collapse after field value changes.
I have a use case where I would want the heading of Section to reflect values of fields under it. This is so I can use Section as collapsed by default to save screen space. The issue is that with this setup:
Section::make(function (array $state) {
if (! $state['test']) {
return 'TEST';
}

return 'Test: ' . $state['test'];
})
->collapsible()
->collapsed()
->schema([
TextInput::make('test')
->reactive(),
])
Section::make(function (array $state) {
if (! $state['test']) {
return 'TEST';
}

return 'Test: ' . $state['test'];
})
->collapsible()
->collapsed()
->schema([
TextInput::make('test')
->reactive(),
])
Auto collapse is forced after each state update. Here is a video https://www.loom.com/share/9559899844ed4e3480d7af0cb7add516 Any ideas how I could resolve this?
7 replies