© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
3 replies
BB

Reorder between Builders

Is it possible to allow reordering between two builders?
If block is created in the first one to be able to also be moved in the other builder.

Current code:
Repeater::make('content')
  ->columnSpanFull()
  ->defaultItems(1)
  ->schema([
    Select::make('columns')
    ->options([
      'grid-cols-1' => "One Column 1/1",
      'grid-cols-2-span-2-2' => "Two Columns 2/2",
      'grid-cols-2-span-2-4' => 'Two Columns 2/4',
      'grid-cols-2-span-4-2' => 'Two Columns 4/2',
     ])
      ->default('grid-cols-1')
      ->live()
      ->reactive(),

    Grid::make()
    ->columns(2)
    ->schema(fn (Get $get) => [
      Builder::make('column1')
      ->hiddenLabel()
      ->blocks(require app_path('Filament/Blocks/ContentBlocks.php'))
      ->addActionLabel(__('Add block'))
      ->blockNumbers(false)
      ->collapsible()
      ->columnSpan(fn (Get $get) => ($get('columns') !== 'grid-cols-1') ? 1 : 12)
      ->collapsed(fn(string $context): bool => $context !== 'create')
      ->reorderable()
      ->cloneable(),

      Builder::make('column2')
      ->hiddenLabel()
      ->blocks(require app_path('Filament/Blocks/ContentBlocks.php'))
      ->columns((int)$get('column2_width'))
      ->addActionLabel(__('Add block'))
      ->blockNumbers(false)
      ->collapsible()
      ->collapsed(fn(string $context): bool => $context !== 'create')
      ->cloneable()
      ->reorderable()
      ->visible(fn (Get $get) => $get('columns') !== 'grid-cols-1'),
      ]),
    ]),
Repeater::make('content')
  ->columnSpanFull()
  ->defaultItems(1)
  ->schema([
    Select::make('columns')
    ->options([
      'grid-cols-1' => "One Column 1/1",
      'grid-cols-2-span-2-2' => "Two Columns 2/2",
      'grid-cols-2-span-2-4' => 'Two Columns 2/4',
      'grid-cols-2-span-4-2' => 'Two Columns 4/2',
     ])
      ->default('grid-cols-1')
      ->live()
      ->reactive(),

    Grid::make()
    ->columns(2)
    ->schema(fn (Get $get) => [
      Builder::make('column1')
      ->hiddenLabel()
      ->blocks(require app_path('Filament/Blocks/ContentBlocks.php'))
      ->addActionLabel(__('Add block'))
      ->blockNumbers(false)
      ->collapsible()
      ->columnSpan(fn (Get $get) => ($get('columns') !== 'grid-cols-1') ? 1 : 12)
      ->collapsed(fn(string $context): bool => $context !== 'create')
      ->reorderable()
      ->cloneable(),

      Builder::make('column2')
      ->hiddenLabel()
      ->blocks(require app_path('Filament/Blocks/ContentBlocks.php'))
      ->columns((int)$get('column2_width'))
      ->addActionLabel(__('Add block'))
      ->blockNumbers(false)
      ->collapsible()
      ->collapsed(fn(string $context): bool => $context !== 'create')
      ->cloneable()
      ->reorderable()
      ->visible(fn (Get $get) => $get('columns') !== 'grid-cols-1'),
      ]),
    ]),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Testing Builders
FilamentFFilament / ❓┊help
9mo ago
Pivot Column Reorder
FilamentFFilament / ❓┊help
3y ago
Reorder Table Clear Cache
FilamentFFilament / ❓┊help
16mo ago
Reorder when bulk deleting
FilamentFFilament / ❓┊help
2y ago