darrena092
darrena092
FFilament
Created by darrena092 on 9/6/2023 in #❓┊help
How can I filter options in AttachAction based on the ownerRecord of my RelationManager?
Title says it basically, I need to reduce the scope of AttachAction options based on a type attribute of $this->ownerRecord in my RelationManager. I'm using recordSelectOptionsQuery, but occasionally it causes problems with $this being called outside of an object context.
3 replies
FFilament
Created by darrena092 on 7/7/2023 in #❓┊help
Pagination duplicates appearing across multiple pages
Having a bit of an issue with the table builder. I have some records, and I want my default sort to show ones which have a specific attribute set (it's a boolean), so I sort by that DESC so the true/1 values get placed first. The issue is that because many records share a true value, they can appear over multiple pages as by default the pagination just uses limit and offset, and my MySQL database doesn't know what it has returned on the previous page. Is there a good way of adding some extra levels of sorting in addition to the default sort / whatever the user has selected with multiple columns?
4 replies
FFilament
Created by darrena092 on 5/30/2023 in #❓┊help
How to properly use a boolean Select field.
Hi there, Having some trouble working out how boolean select fields are meant to work. If I call Select::make('my_field')->boolean('Yes', 'No', 'Select an option'), then it doesn't actually work if I pre-fill that field with an actual boolean. I suspect this is because the options are set to 0 and 1 by this and true !== 1. How is this intended to be used? Should the field actually be treated as a number and cast to a boolean after the fact?
3 replies
FFilament
Created by darrena092 on 5/5/2023 in #❓┊help
Is there a simple way to use Filament components outside of the admin panel?
Hi, I'm working on a part of my project that could really be sped up by using some components from Filament outside of the admin panel. At the minute, I've been trying to include scripts/styles by using snippets from the Filament base layout to support these components. Is there a more straightforward way of doing this? Like some sort of helper that I can call in my application layout blade template? Also is this a supported use case for Filament components? I don't see anything in the docs that shows using anything outside of an admin panel context.
12 replies