Make only specific repeater elements non-deletabel

Hi, I wonder if it is currently possible to make only specific repeater items nonDeletable


    public static function getItemsRepeater(): Repeater
    {
        return Repeater::make('orderItems')
            ->relationship('orderItems') // This links the Repeater to the hasMany relationship on Order
            ->schema([
                Grid::make(['md' => 12])->schema([
                    TextInput::make('quantity')
                        ->label('Quantity')
                        ->numeric()
                        ->default(1)
                        ->required()
                        ->suffix('pcs')
                        ->columnSpan(['md' => 2])
  ......

                    TextInput::make('meta')
                        ->label('Meta')
                        ->columnSpan(['md' => 2])
                    ,
                ])->disabled(fn($get) => filled($get('invoice_id')))
                ,
            ])
            ->deletable(fn($get) => blank($get('invoice_id'))) // <- This disables delete button
            ->defaultItems(0)
            ->hiddenLabel()
            ->columns(['md' => 10]);
    }
Was this page helpful?