Default value persistence in Filament Repeater after migration rollback
0 reputation · 10 Jan 2024, 05:27 UTC
Scenario
A Filament form uses a Repeater field with a default closure that pre‑populates a row. After upgrading the application, the database migration that creates the repeater’s underlying table is rolled back due to a failure. The form still renders, but no rows appear, suggesting the default closure is not re‑executed.
Constraints
• Filament 2.x or newer, where the lazy option defers rendering until interaction.
• The default closure runs only once at component initialization.
• Laravel migration rollback does not automatically reseed repeater data.
Unresolved Questions
- Does Filament automatically re‑execute the
defaultclosure after a migration rollback, or must developers manually reseed the repeater data? - Is there a configuration or lifecycle hook that can enforce default row persistence across migrations?
- How does the
lazyrendering option affect the visibility of default rows during a rollback scenario?