[Feature]: Make blocks collapsible
Opened this issue · 1 comments
aeq-dev commented
What happened?
Can we make blocks collapsible ?
How to reproduce the bug
Package Version
1.0.1
PHP Version
8.2
Laravel Version
10.x
Which operating systems does with happen with?
No response
Notes
No response
bariskanberkay commented
Simple add use CanBeCollapsed; NestedSubBuilder.php file
use CanBeCollapsed;
Forms\Components\Section::make('Genel Ayarlar IOS')
->statePath('content.array_conf')
->schema([
NestedBuilder::make('array_configuration')
->collapsible() //ADD THIS
->nestedConfiguration(function (NestedSubBuilder $builder) {
$builder->blockNumbers($builder->getLevel() == 1);
$builder->columnSpanFull();
$builder->collapsible(); //ADD THIS
})
->nestedSchema(function (NestedSubBuilder $builder) { // Closure is mandatory
return self::getBlocks($builder);
})
])
I created PR for this. #5