usmcgator
wire:click in navigation in v2?
Is there a way to bind navigation items to a livewire click action? I have SPA navigation working in a custom page but would like to move the nav to the Filament navigation menu. There are actions a user takes that should update a badge for a menu item and I'd like it to update without a page reload. Possible?
3 replies
Suggestions for Wizard navigation
I used some of the Wizard code to create a similar experience in my app. It generally works well, but after seeing it on several aging monitors, it seems as if many people experience the navigation items being cropped by the next nav item, even before they shrink the screen size. This is a navigation with visual cues to indicate when that step in the Wizard has been complete. It shows the svg circle with an checkmark or x inside if complete or not. Any suggestions on having all items shrink as space becomes an issue, and maybe putting the icon below the text at some point? Thanks!
3 replies
display count matching getTableRecordClassesUsing
I have a component displaying a table and it's highlighting certain rows using the getTableRecordClassesUsing() function.
The blade file is pretty simple as it just returns the table. However, I'd like to have the count of rows matching the getTableRecordClassesUsing() available in this blade file as I'd like to do some other blade logic based on that value. I tried saving the count in a variable, but it doesn't get updated below the table after the user edits a record making it no longer match the getTableRecordClassesUsing() function. Any help would be greatly appreciated.
4 replies
counts not working on relationship
I'm trying to add a column that shows a count of the related records. This code correctly displays JSON output of the related records, so I know it's getting them correctly, but counts() doesn't work.
This gets results from the relationship:
This fails with: Call to a member function goals() on null
Here are the relationships:
Where am I going wrong?
8 replies
Custom table action for related resources
I have missions and goals components. In the missions component, I created a "Create Goal" table action which renders a modal to add a goal for that mission. When I click submit, it wants to add the record to the missions table, not the goals table. Here's my action code. How do I get it to save to the goals table, also, how do I pass the mission_id to this action?
4 replies
consume an external API with Filament Tables
I tried a new Laravel install using this package https://filamentphp.com/blog/how-to-consume-an-external-api-with-filament-tables, but it always returns a "could not find driver" error. I'm not sure why it's doing this as the entire purpose of this package is to consume JSON and use it in a Filament table without having to use a database. I tried a clean install using the instructions here https://github.com/leandrocfe/filament-tables-json-data-source, but it always results in the same error. Any ideas?
could not find driver
CREATE TABLE "publications" (
"id" integer NOT NULL PRIMARY key autoincrement,
"title" varchar,
"description" varchar,
"price" integer,
"rating" float,
"brand" varchar,
"category" varchar,
"thumbnail" varchar
)
12 replies
Wizard Steps as Table views?
This may be outside the use case of the Wizard, but is there any way to make each step show a table list of records from different tables? The use case is review of imported records, if the list looks correct, they check a box and click Next. It won't progress to the next step unless that box is ticked. The next step is another table list of records from a different table where they do the same. There will be steps where they will have to add/edit records in other tables in addition to the table list steps. Is this possible?
5 replies
TableWidget Actions not working as expected
I'm trying to add actions to a WidgetTable, but the actions don't work as expected. When clicking on the Edit link, it appears to call the Save method as I get a notification in the upper right that it was saved. Where am I going wrong?
19 replies
How to set prependActions on table
Is there a similar method to the ->prependActions() method when creating a table definition in a TableWidget?
I'm getting the Table Actions like this:
but I don't think there's a getTablePrependActions() method similar to ->prependActions() , so I tried making a public function, but that didn't work.
Where am I going wrong here?
28 replies
Wizard with each step from different model?
Most examples I've seen of the Filament wizard are to separate all the fields from a single model into a multi-step process, like adding name, email, password when creating a new user account. It's still all just submitting to the user table.
I'd like the wizard to step through adding data to multiple forms, each adding their respective data to a different table. Is this doable?
6 replies
Filling a table with data?
Most of my app displays data from tables, and Filament makes them look beautiful with pagination, filters, etc. There is one section where I'm not pulling from an internal table but an external source that returns JSON. To keep things looking consistent, it'd be great if I could populate a Filament table with this JSON and leverage all the goodies that come with tables. Doable?
5 replies