Add Edit Icon To Repeater

Hi All, I am struggling to get an edit icon added to the repeater that would prompt the 'Add' form to appear but with the existing row data pre-populated. Am not finding any answers in the docs - does anyone know if there is an add-on available that would achieve this, or perhaps a way to add a custom action to each row?
No description
4 Replies
I am that I am
Is this a custom repeater field? I think it's possible to edit each row in the filament repeater field.
toeknee
toeknee4w ago
So you want an add action, the fillFormUsing the $record for that repeater.
divStrong
divStrongOP4w ago
Am using the TableRepeater like this: public static function getTableRepeater(){ return TableRepeater::make('items') ->addable(false) ->minItems(0) ->defaultItems(0) ->headers([ Header::make('name')->label('Item Name'), Header::make('colors')->label('Color(s)'), Header::make('size')->label('Size'), Header::make('qty')->label('Quantity'), Header::make('price')->label('Price') ]) ->schema([ Placeholder::make('name_label') ->disableLabel() ->content(fn ($get) => // separate with new lines new HtmlString('<strong>'.static::getItemName($get('name')).'</strong>'. '<br>'.static::getLocation($get)) ), This property allows for copying: ->cloneable() But is there an ->editable() or similar property to allow editing each row? Essentially yes. 'Edit' would prompt the same 'Add' form, except prepopulated with the existing record data that would save changes instead of adding new If this needs to be done in a modal, that's OK too, just trying to avoid having to delete/add if the user makes a mistake adding item
awcodes
awcodes4w ago
There is no editable because it is meant to use form fields like a normal repeater meaning the changes are inline. This is just an alternative view to a normal repeater.

Did you find this page helpful?