F
Filament16mo ago
jouni.i

Filament Section if isCollapsed

How i can show section heading only if section isCollapsed?
1 Reply
Hasnayeen
Hasnayeen16mo ago
Components\Section::make('Content')
->extraAlpineAttributes([
'x-init' => '
$el.querySelector(\'h3\').classList.add(\'hidden\')
$watch(\'isCollapsed\', value => $el.querySelector(\'h3\').classList.toggle(\'hidden\'))',
])
Components\Section::make('Content')
->extraAlpineAttributes([
'x-init' => '
$el.querySelector(\'h3\').classList.add(\'hidden\')
$watch(\'isCollapsed\', value => $el.querySelector(\'h3\').classList.toggle(\'hidden\'))',
])

Did you find this page helpful?