Arif Hossain
Arif Hossain
FFilament
Created by Arif Hossain on 2/7/2024 in #❓┊help
Is there any way to cache table widget query records?
I have a Product Model and a latest product widget in dashboard. products are not add or updating frequently, that's why i want to cache latest products query data for time but i can't find any way to cache table query records.
4 replies
FFilament
Created by Arif Hossain on 12/18/2023 in #❓┊help
How do update badge count when filters get updated?
In record list page with tabs, when i update filters, tables data is updating but tab's badge count not updating. how i can update Tab's badge count as well?
2 replies
FFilament
Created by Arif Hossain on 12/9/2023 in #❓┊help
Dashboard widget is getting called 3 times on each request.
I have a new products table widget on the dashboard. that simply query products of the last 7 days. but I found that when I load the dashboard, it's getting called 3 times on each dashboard request. As a result, this widget sends the same query 3 times to the database! how can i disable widget rerendering? also is there any way to cache table data?
2 replies
FFilament
Created by Arif Hossain on 10/4/2023 in #❓┊help
ViewRecord Page header action does not open modal. showing console error
Uncaught Snapshot missing on Livewire component with id: zBM60WWVSyzMTq2Vgutp
3 replies
FFilament
Created by Arif Hossain on 9/18/2023 in #❓┊help
How can i add select option dynamically from suffixAction ?
I have a select field with one option initially. I have also added a suffixAction to pick a record and trying to add new option from picked record dynamically to select field. but can't do it. can anyone help please?
Forms\Components\Select::make('union_id')
->label(__('labels.union'))
->options(function (): array {
$union = Union::find(auth()->user()->location[0]);
return [
$union->id => $union->name_bn
];
})
->suffixAction(
Forms\Components\Actions\Action::make("select_union")
->icon('heroicon-o-plus')
->modalHeading(__('labels.select_union'))
->form(self::locationForm())
->modalCancelAction(false)
->modalSubmitActionLabel(__('labels.select'))
->action(function (Set $set, $state, array $data, Component $component) {

$union = Union::find($data['union']);
$component->options([
$union->id => $union->name_bn
]);
$set('union_id', $union->id);

}),
)
Forms\Components\Select::make('union_id')
->label(__('labels.union'))
->options(function (): array {
$union = Union::find(auth()->user()->location[0]);
return [
$union->id => $union->name_bn
];
})
->suffixAction(
Forms\Components\Actions\Action::make("select_union")
->icon('heroicon-o-plus')
->modalHeading(__('labels.select_union'))
->form(self::locationForm())
->modalCancelAction(false)
->modalSubmitActionLabel(__('labels.select'))
->action(function (Set $set, $state, array $data, Component $component) {

$union = Union::find($data['union']);
$component->options([
$union->id => $union->name_bn
]);
$set('union_id', $union->id);

}),
)
6 replies