triad
triad
FFilament
Created by triad on 9/13/2024 in #❓┊help
Buttons duplicated
all the buttons in my panel are showing up twice in production, but not in development. see attached for an example. i'm on v 3.2.112. does anyone know what the issue is? thanks! edit: it's not letting me attach the photo here. see the first comment below
9 replies
FFilament
Created by triad on 9/8/2023 in #❓┊help
$set in afterStateUpdated () not working in v3 but worked in v2
I have the two fields below. I'm trying to update property_id when customer_id changes. This worked in v2 but doesn't work in v3. afterStateUpdated is definitely being called and I can $set other fields. Any ideas?
Select::make('customer_id')
->relationship(
'customer',
'name',
modifyQueryUsing: fn (Builder $query) => $query->whereBelongsTo(Filament::getTenant()))
->searchable()
->afterStateUpdated(function (Set $set, ?string $state) {
$set('property_id', Customer::find($state)?->properties()->first()?->id);
})
->required()
->reactive(),
Select::make('property_id')
->relationship('property', 'address_formatted',
function (Builder $query, Get $get) {
return $query->where('customer_id', $get('customer_id'));
}
)
->required(),
Select::make('customer_id')
->relationship(
'customer',
'name',
modifyQueryUsing: fn (Builder $query) => $query->whereBelongsTo(Filament::getTenant()))
->searchable()
->afterStateUpdated(function (Set $set, ?string $state) {
$set('property_id', Customer::find($state)?->properties()->first()?->id);
})
->required()
->reactive(),
Select::make('property_id')
->relationship('property', 'address_formatted',
function (Builder $query, Get $get) {
return $query->where('customer_id', $get('customer_id'));
}
)
->required(),
29 replies