-
PackageForm builder Package Versionv3.2.97 How can we help you?This has worked previously, so I'm not sure what has changed that's causing this problem. I have this error when I try to save my form:
It only happens when I add a new row in the repeater. If I edit the rest of my form, it saves fine. If I remove a row in the repeater, it also saves fine. Livewire does not seem to like that I've added a new row. This ID ( Here's some context, in my EventResource, I have a repeater for invitations //...
public static function form(Form $form): Form {
return $form
->columns(1)
->schema([
Tabs::make()->tabs([
Tabs\Tab::make('Invitations')->schema([
Repeater::make('contacts')
->reorderable(false)
->columns(2)
->collapsible(false)
->collapsed(false)
->defaultItems(0)
->hiddenLabel()
->cloneable()
->deletable()
->deleteAction(
fn(Action $action) => $action->requiresConfirmation(),
)
->addActionLabel('Add invitation')
->relationship('invitations')
->schema([
Select::make('contact_id')
->label('Contact')
->searchable()
->preload()
->searchDebounce(500)
->relationship('contact', 'name',
modifyQueryUsing: fn(Builder $query) => $query->whereTeamId(Filament::getTenant()->id)
)
->required(),
// More generic fields here
])
//... The new row is saved (hence the ULID), but it's bringing up the livewire error. Is there any way around this or does anyone know what I might be doing wrong? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Are you using the panel builder or only the form builder? |
Beta Was this translation helpful? Give feedback.
-
Reverting back to 3.2.92 has resolved this for me. I assume there's a bug introduced between 3.2.92 and 3.2.97, I haven't had a chance to look into it further. |
Beta Was this translation helpful? Give feedback.
-
Downgrading to 3.2.95 works as well. The issue starts in 3.2.96 The source of the issue is the commit 18da9f4 in the line. For me the problem is with the Model attribute $model->ulid = Str::ulid(); A solution, in the Model cast the protected function casts(): array
{
return [
'ulid' => 'string',
];
} What do guys think, is this a good solution ? |
Beta Was this translation helpful? Give feedback.
Reverting back to 3.2.92 has resolved this for me. I assume there's a bug introduced between 3.2.92 and 3.2.97, I haven't had a chance to look into it further.