Thiktak/filament-nested-builder-form

[Feature]: Make blocks collapsible

Opened this issue · 1 comments

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

Simple add use CanBeCollapsed; NestedSubBuilder.php file
use CanBeCollapsed;
Ekran Resmi 2024-01-03 18 00 30

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