IndomieRendang
IndomieRendang
FFilament
Created by IndomieRendang on 11/24/2023 in #❓┊help
Filament in react behavior?
Well this might be a stupid question, or very very smart & cool. Anyone feels the table (especially with a lot of rows with complex decorations like badge, icons, colors) loaded or updated relatively slow, or very slow? Yeah that's ssr, we know, livewire.. I don't have any problems with form, widgets or page since they're small and quickly rendered... But tables are really different case, in term of massive repetitions and size... I'm just curious, is it possible for us to prepare our "fixed row template", bring it to the hardcoded view as an alpine template, then we just send json for any update???? I want anyone to help me decide whether I should allocate my time for trying that or just never do it at all 😅
2 replies
FFilament
Created by IndomieRendang on 11/24/2023 in #❓┊help
Get updated row selection on modal open
I have a bulk action and want to fill form based on current selection. It works at the first modal open, but after closing modal, update the selection, then click the action again, the $records data is not updated.
BulkAction::make('foo')
->form([
TextInput::make('total_amount')->disabled(),
// ...
])
->fillForm(fn ($records) => [
// $records not updated
'total_amount' => $records->sum('total_amount')
])
->action(fn ($records, $data) => dd($records)) // $records updated
BulkAction::make('foo')
->form([
TextInput::make('total_amount')->disabled(),
// ...
])
->fillForm(fn ($records) => [
// $records not updated
'total_amount' => $records->sum('total_amount')
])
->action(fn ($records, $data) => dd($records)) // $records updated
3 replies
FFilament
Created by IndomieRendang on 11/17/2023 in #❓┊help
Can I defer-loading a table column/cell?
I need it because there's one column that fetches from an external API, individually. So waiting the whole table to load is not fun, right?
$table
->columns([
TextColumn::make('foo')
->getStateUsing(fn ($record) => SomeApiService::getDeviceStatus($record->device_key)),
])
$table
->columns([
TextColumn::make('foo')
->getStateUsing(fn ($record) => SomeApiService::getDeviceStatus($record->device_key)),
])
I expect that the table load normally, but that column will be 'loading' and show the result later.
8 replies
FFilament
Created by IndomieRendang on 11/17/2023 in #❓┊help
Anonymous Action doesn't work correctly inside repeater?
Repeater::make('items')
->schema([
TextInput::make('name'),
Actions::make([
Action::make('set_default')
->action(fn ($get) => dd($get('name'))
]),
]),
Repeater::make('items')
->schema([
TextInput::make('name'),
Actions::make([
Action::make('set_default')
->action(fn ($get) => dd($get('name'))
]),
]),
From the example above, the dd will always get the same state from the first row, no matter how many we have the row in the repeater. I can confirm that the state path of that action container are the same across repeater rows. So they also share the loading state, means when an action is loading, the others are loading too. But I have no idea to fix it.
8 replies
FFilament
Created by IndomieRendang on 10/21/2023 in #❓┊help
Different bulk actions for each table tab?
Anyone know how to specify different bulk actions for different table tab?
2 replies
FFilament
Created by IndomieRendang on 9/19/2023 in #❓┊help
How to remove loading spinner on SPA mode?
No description
2 replies
FFilament
Created by IndomieRendang on 8/18/2023 in #❓┊help
Redirect login to the last accessed tenant?
Can I set/store the last accessed tenant when logout and then it will be the next destination after login?
24 replies
FFilament
Created by IndomieRendang on 8/18/2023 in #❓┊help
How to globally set $defaultDateTimeDisplayFormat ?
I see there's Table::$defaultDateTimeDisplayFormat property, but I can't figure out how to set it globally. Is it possible and how to achieve that? I'm using panel. Thanks.
2 replies
FFilament
Created by IndomieRendang on 8/8/2023 in #❓┊help
Cropped tenant menu on collapsed sidebar
2 replies
FFilament
Created by IndomieRendang on 8/7/2023 in #❓┊help
Relation Manager: Can't modify AttachAction
Hopefully this is not livewire bug (again), I can't see it works:
AttachAction::make()
->modalHeading('Lorem')
->preloadRecordSelect()
->recordSelect(fn ($select) => $select->placeholder('Foo'))
// and so on
AttachAction::make()
->modalHeading('Lorem')
->preloadRecordSelect()
->recordSelect(fn ($select) => $select->placeholder('Foo'))
// and so on
3 replies
FFilament
Created by IndomieRendang on 8/6/2023 in #❓┊help
Can't disable checkbox, radio, toggle?
Is it true that we can't disable checkbox, radio and toggle? I've already used ->disabled() but not disabled at all.
6 replies
FFilament
Created by IndomieRendang on 7/20/2023 in #❓┊help
How to show loading indicator for bulk action button?
Is it possible to show loading/spinner while waiting for some action (bulk action) to complete? I don't want to queue the process so user must wait for it... I see inline actions can show loading but not with bulk action.
2 replies
FFilament
Created by IndomieRendang on 7/7/2023 in #❓┊help
Make bulk action reactive to selection
Is it possible to check the selection to make a bulk action disabled/enabled? For example, if there are rows in selection do not have 'tracking_number', the 'Send' bulk-action is disabled
10 replies
FFilament
Created by IndomieRendang on 6/5/2023 in #❓┊help
Customizing option label from select with relationship
Forms\Components\Select::make('product_id')
->label('Product')
->relationship('product', 'name', fn (Builder $query) => $query->withTrashed())
->searchable()
Forms\Components\Select::make('product_id')
->label('Product')
->relationship('product', 'name', fn (Builder $query) => $query->withTrashed())
->searchable()
Since the relationship includes trashed products, how to modify the option label from e.g: Laptop to Laptop (archived)for trashed products?
2 replies
FFilament
Created by IndomieRendang on 6/5/2023 in #❓┊help
Add "Save/Create and Back" beside "Save/Create" button in edit and create page
I know how to change redirect url after submitting the form, but how to create another button for redirect to list after submitting the form?
4 replies
FFilament
Created by IndomieRendang on 6/1/2023 in #❓┊help
How to work with disablePlaceholderSelection() ?
3 replies
FFilament
Created by IndomieRendang on 5/30/2023 in #❓┊help
Is this a bug? (Repeater field)
Sometimes it happens. Maybe this is known issue? I'm using Table Repeater plugin in this video, but this also happens using native repeater field (because I don't want to revert back using filament repeater). I will record again using filament repeater field if someone really doesn't believe me 😵‍💫
3 replies
FFilament
Created by IndomieRendang on 5/19/2023 in #❓┊help
Conditionally hide attach action
How to conditionally hide attach action when the relationships has reached n rows? A little note: for this case I don't want to use model policy
7 replies
FFilament
Created by IndomieRendang on 5/8/2023 in #❓┊help
Custom validation message?
Hi, how to change some validation message for specific form? Invitation action form:
TextInput::make('email')
->unique(
table: 'team_invitations',
callback: fn (Unique $rule) =>
$rule->where('team_id', getPermissionsTeamId())
TextInput::make('email')
->unique(
table: 'team_invitations',
callback: fn (Unique $rule) =>
$rule->where('team_id', getPermissionsTeamId())
I just want to make a very little change: "The Email has already been taken invited this team" so I think I shouldn't modify the lang file.
6 replies
FFilament
Created by IndomieRendang on 5/5/2023 in #❓┊help
Use same icon for different state in BadgeColumn
I need to use same icon class for different value, how to make it possible?
BadgeColumn::make('status')
->icons([
'heroicon-o-clock' => 'Pending',
'heroicon-o-clock' => 'Awaiting Confirmation',
])
BadgeColumn::make('status')
->icons([
'heroicon-o-clock' => 'Pending',
'heroicon-o-clock' => 'Awaiting Confirmation',
])
The structure above however looks impossible (and didn't work) as those values share the same key. I tried something like this but still didn't work.
BadgeColumn::make('status')
->icons([
'heroicon-s-clock' => ['Pending','Awaiting Confirmation'],
])
BadgeColumn::make('status')
->icons([
'heroicon-s-clock' => ['Pending','Awaiting Confirmation'],
])
Any way to achieve that?
3 replies