Nested repeater not maintaining order

Hi all, I use a repeater inside a builder, in a resource that uses the Spatie Translatable plugin. When I set a order, and save it, all is fine. When I reload and change something else and then save, the order is mixed up. I also notice this on another project, so it seems it maybe has a correlation with the translateable plugin for Filament. There are no errors, the array is just malformed. The blocks in the builder do keep their order, that works fine. It is not a relation, all stored in JSON column in db. Does anymore maybe experienced the same?
Forms\Components\Repeater::make('click_through_items')
->label('Items na doorklikken')
->reorderableWithButtons()
->collapsed()
->collapsible()
->schema([
Forms\Components\TextInput::make('title')
->live()
->label('Titel'),
TiptapEditor::make('text_vic_tory')
->output(TiptapOutput::Html)
->label('Tekst bij mouseover'),
Forms\Components\TextInput::make('click_url')
->label('Verwijzing bij klikken (url)')
])
Forms\Components\Repeater::make('click_through_items')
->label('Items na doorklikken')
->reorderableWithButtons()
->collapsed()
->collapsible()
->schema([
Forms\Components\TextInput::make('title')
->live()
->label('Titel'),
TiptapEditor::make('text_vic_tory')
->output(TiptapOutput::Html)
->label('Tekst bij mouseover'),
Forms\Components\TextInput::make('click_url')
->label('Verwijzing bij klikken (url)')
])
1 Reply
Lara Zeus
Lara Zeus2mo ago
can you test with this fork: https://github.com/lara-zeus/translatable also add: ->orderColumn('sort') to the repeater, but from the docs its only for relations https://filamentphp.com/docs/3.x/forms/fields/repeater#reordering-items-in-a-relationship
Want results from more Discord servers?
Add your server