Mark Chaney
Mark Chaney
FFilament
Created by Mark Chaney on 11/13/2024 in #❓┊help
Fileupload field and Grid
No description
3 replies
FFilament
Created by Mark Chaney on 11/12/2024 in #❓┊help
Lazy loaded tables and refresh()
I would really like the ability to lazy load table components I have in tabs on standalone livewire pages. But if I have a dispatch to refresh that component after an action happens and if it’s not currently loaded, I get the error ‘$table must not be accessed before initialization’. How can I more elegantly handle this in a simple way? Do I override refresh() in my tabs trait that does some checks first? Seems like livewire should handle this a bit more gracefully. Obviously it doesn’t need to rerender something that hasn’t rendered yet.
2 replies
FFilament
Created by Mark Chaney on 9/29/2024 in #❓┊help
Global Notification Colors
As far as I can see, there is no way to automatically have the color() of the notificaiton simply to be the same as the status(), right? So if its a success message, the color will be success (green). I simply want background colors automatically on all notifications. Am i missing something? Tried Notification::configureUsing($notification), but nothing is available in the $notification.
7 replies
FFilament
Created by Mark Chaney on 9/26/2024 in #❓┊help
ActionGroups and Testing
When asserting that a table action exists, is it handled any differently when an action group is involved? Having an issue asserting that an ImportAction exists in an ActionGroup on a table header. Says it cant find it.
2 replies
FFilament
Created by Mark Chaney on 9/18/2024 in #❓┊help
unique() and disabled()
Why is unique still ran on a disabled field? Even weirder is that unique(IgnoreRecord: true) is set, so it should pass anyway. if i remove my disabled check and allow input, it saves fine with the existng data.
2 replies
FFilament
Created by Mark Chaney on 9/17/2024 in #❓┊help
Control the order of processing import records?
Is there way to control the order a csv is processed? Lets say i have a particular date column and i want to make sure rows are processed oldest to newest.
3 replies
FFilament
Created by Mark Chaney on 9/14/2024 in #❓┊help
Center Top Navigation?
Anyone worked out the css or whatever is needed to center the top navigation items in the panel builder when choosing the top layout?
5 replies
FFilament
Created by Mark Chaney on 9/11/2024 in #❓┊help
Working form field on ViewRecord?
I have an Input form at the top of the long form that i use for search for input fields. Works great on edit, but on viewrecord, its disabled. Is there a way not to disable this single input field on ViewRecord? Its set to dyhydrated(false) anyway, so its never used for actual saving anything.
4 replies
FFilament
Created by Mark Chaney on 9/10/2024 in #❓┊help
canAccess() and Clusters
Shouldnt i be able to use public static function canAccess(): bool { return false; } } to stop a user from accessing a cluster and its contents? Obviously testing in its simplest form. Right now it doesnt appear to do anything.
5 replies
FFilament
Created by Mark Chaney on 9/6/2024 in #❓┊help
Widgets Same Height
These are general widgets and not charts. Wasnt sure if anyone else already had a solution created for ensuring widgets in the same row have the same height. Trying to do it as simple and clean as possible.
4 replies
FFilament
Created by Mark Chaney on 9/6/2024 in #❓┊help
Navigation and Dashboard
How can i only have the logo go to the dashboard and keep it dashboard form the main navigation?
4 replies
FFilament
Created by Mark Chaney on 8/24/2024 in #❓┊help
Disable ExportAction Modal?
If we are not going to have any export options and have mapping disabled, there really is not need for a modal for an export action. Is there a way to bypass it?
10 replies
FFilament
Created by Mark Chaney on 8/16/2024 in #❓┊help
ImportColumn relationship nullable
How can i set an import column relationship to nullable? i dont want it to fail if it cant find a match. Im already handing creation of that relationship in afterCreate() if it wasnt found.
ImportColumn::make('author')
->relationship()
ImportColumn::make('author')
->relationship()
6 replies
FFilament
Created by Mark Chaney on 8/13/2024 in #❓┊help
Lazy load and livewire refresh with tables
ok, so i have some alpine tabs and within those tabs are lazy loaded lw3 components with filament tables in it. Now on the parent component, sometimes i perform an action that would require one of those lazy loaded components to be refreshed (which really only matters if that tab is active). The problem is that if i sent the refresh event to a component that isnt currently rendered, it throws an error about $table must not be accessed before initialization. Is there not a native way to not attempt a refresh for a component that isnt even rendered? Doesnt really make sense to refresh one that isn rendered, right? I use these components in different areas of the app, so I am hoping to avoid having to add a property like $isRendered that has to be set/checked, etc, on each one.
3 replies
FFilament
Created by Mark Chaney on 7/26/2024 in #❓┊help
Setting/Asserting TableActionData
does ->setTableActionData($data) wipe out default() values for the form even if its not a set in $data and can ->assertTableActionDataSet() check defaults? Was thinking something like ->assertTableActionDataSet([...$data, 'primary_case_manager' => $user->case_manager_id]). Full code being
Livewire::test(ListParticipants::class)
->mountTableAction(CreateAction::class)
->setTableActionData($data)
->assertFormFieldIsVisible('name', 'mountedTableActionForm')
->assertFormFieldIsHidden('send_welcome_email', 'mountedTableActionForm')
// assert that the case manager's agency is selected by default
->assertTableActionDataSet([...$data, 'primary_case_manager' => $user->case_manager_id])
->callMountedTableAction()
->assertHasNoTableActionErrors();
Livewire::test(ListParticipants::class)
->mountTableAction(CreateAction::class)
->setTableActionData($data)
->assertFormFieldIsVisible('name', 'mountedTableActionForm')
->assertFormFieldIsHidden('send_welcome_email', 'mountedTableActionForm')
// assert that the case manager's agency is selected by default
->assertTableActionDataSet([...$data, 'primary_case_manager' => $user->case_manager_id])
->callMountedTableAction()
->assertHasNoTableActionErrors();
. Cant seem to assert that default value of the primary_case_manager field.
5 replies
FFilament
Created by Mark Chaney on 6/24/2024 in #❓┊help
Inline Radio - Single Column?
No description
2 replies
FFilament
Created by Mark Chaney on 6/8/2024 in #❓┊help
updatedTableFilters() no longer firing
Since upgrading to livewire 3/filament 3, ive noticed that
public function updatedTableFilters(): void
{
dd($this->tableFilters);
}
public function updatedTableFilters(): void
{
dd($this->tableFilters);
}
no longer fires when a filter is removed. It does run when one is added. Any suggestions?
2 replies
FFilament
Created by Mark Chaney on 6/4/2024 in #❓┊help
Database Notifications on Vapor
No description
4 replies
FFilament
Created by Mark Chaney on 5/3/2024 in #❓┊help
Custom ValidationMessages for minDate/maxDate
I have tried the following, but the html5 validation still shows the default browser error. Do i need to about it differently?
DatePicker::configureUsing(function (DatePicker $datePicker) {
return $datePicker->minDate(Carbon::createFromDate(1500, 1, 1))
->maxDate(now()->addYears(9))
->validationMessages([
'after_or_equal' => 'The :attribute must be after January 1, 1500.',
'before_or_equal' => 'The :attribute cannot be more than 9 years in the future.',
]);
});
DatePicker::configureUsing(function (DatePicker $datePicker) {
return $datePicker->minDate(Carbon::createFromDate(1500, 1, 1))
->maxDate(now()->addYears(9))
->validationMessages([
'after_or_equal' => 'The :attribute must be after January 1, 1500.',
'before_or_equal' => 'The :attribute cannot be more than 9 years in the future.',
]);
});
4 replies
FFilament
Created by Mark Chaney on 4/19/2024 in #❓┊help
Testing and requiresConfirmation
I have a RM with a table row action, that row action launches a modal with an approval action. I can get all the way up that point and it works fine in my test and will perform the approveAction, but if i add a confirmation to the approveAction, I cant seem to figure how to click the "Confirm" on the requiresConfirmation modal as it doesnt appear to have a mountAction for me to be able to call. This is wher i am so far:
Livewire::test(RftaResource\RelationManagers\ComparableUnitsRelationManager::class, [
'pageClass' => RftaResource\Pages\ViewRfta::class,
'ownerRecord' => $rfta,
])
->assertCanSeeTableRecords(collect([$comparable]))
->mountTableAction(ViewAction::class, record: $comparable->id)
->assertSee('Review Comparable Unit')
->assertSee('approveAction')
->mountTableAction('approveAction')
->callMountedTableAction() // requires confirmation
// now how do I click confirm on the requiresConfirmation() modal?
->assertHasNoTableActionErrors();
Livewire::test(RftaResource\RelationManagers\ComparableUnitsRelationManager::class, [
'pageClass' => RftaResource\Pages\ViewRfta::class,
'ownerRecord' => $rfta,
])
->assertCanSeeTableRecords(collect([$comparable]))
->mountTableAction(ViewAction::class, record: $comparable->id)
->assertSee('Review Comparable Unit')
->assertSee('approveAction')
->mountTableAction('approveAction')
->callMountedTableAction() // requires confirmation
// now how do I click confirm on the requiresConfirmation() modal?
->assertHasNoTableActionErrors();
21 replies