BuddhaNature
How can the resource query be modified on an Infolist page?
Hi,
When loading a resource, the standard
select
uses *. On a table page, I can use modifyQueryUsing()
to modify the resource to suit the table's needs, but I don't see a way to do that with a View page that doesn't have a modifyQueryUsing()
method either on the Page or the Infolist.6 replies
Show which tabs have form errors when a form is submitted
I have an "Infolist" page with entries organized in tabs. To keep the UI consistent and a pleasant experience for the user, the edit action displays all of the form elements in the same tab structure in the form.
The problem I am facing is that when the form is submitted and re-rendered with validation errors, it's not clear where the validation errors are because the page is reset back to the first tab on submit.
The end user does not know where the validation error is and has to click on each individual tab.
Has anyone come up with a solution to a problem like this? Is there a way to either highlight a tab with errors or add a badge with a count of errors?
1 replies
How can I force a modal to a view when a view page exists.
Hi, I have an action that links to a view page, but I'd also like to have a link to a preview page of that view page as a modal. I am using the following code:
The second View action works perfectly and links to the view page. But the first View action does not act as a modal and instead links directly to the view page. How can I get the preview link to work as a modal?
6 replies
How can I remove the resource name from all action buttons such as "create"?
How can I remove the resource name from all action buttons such as "create"? For example, If I have a "Book" resource and a "Movie" resource, I end up with "Create Book" and "Create movie" buttons assuming the action is "Create."
I'd like the button to omit the resource name without having to explicitly use a
label()
method because I don't want to lose localization options.
The end result I'm looking for is to have a simple "Create" button that is localized without having to localize the resource name/label.1 replies
Customizing the user experience of the empty state on tables based on existing conditions.
I have a question about the user experience when using tables.
Let's assume that there is an empty table because there are no records created and the empty state has been configured with
->emptyStateActions()
, ->emptyStateDescription()
, ->emptyStateHeading()
, and ->emptyStateIcon()
. In this scenario, we can write copy to clearly instruct the user on what to do to add a record.
But in a different scenario, where there are 100 records, and none are trashed, if the user filters to show only trashed records, they would get the same message as above.
Is there a way to do something like this:
I know isFilteredView()
is not real, but is there a way to tell if the filtering system is engaged or not?
In my use case someone was tinkering and activated a filter for "favorites" and thought there were no records because she got the empty state. She reentered data that was already available. I'd like to be able to clearly articulate to the end user what they are seeing based on their actions.4 replies
Updating a date with a Table Toggle.
Hi, I have a dateTime filed called
archived_on
. I'd like to edit this column using a toggle field in a table. Specifically, when the toggle is switched to "off", I want the date field to be set to null
, when the toggle is switched to "on", I want the field to be set to now()
. How can I go about this?5 replies
How to show a table with only records that belong to the authenticated user?
Hi, I'm building a sample Filament site to practice and learn. I'm stuck on how I can make a resource only show records that belong to the authenticated user. For example, in my
products
table, I have a user_id
column. I only want to show records that match user_id
with auth()->user()->id
in my Filament table.10 replies
Should I require Livewire 3 manually before I require Filament in my project?
Hi,
I've been playing with Filament, and I see that if I create a new Laravel project and immediately include Filament, Livewire is brought in as a dependency. However, I see many people bringing in Livewire 3 manually first and then bringing in Filament. I'm wondering why and if this is a best practice.
3 replies