johnnie_littleshoes
johnnie_littleshoes
FFilament
Created by badcom on 2/25/2024 in #❓┊help
Not receiving notification on data export
Marked your reply as the solution, because one of my panels was missing exactly that and now it works 🙂
5 replies
FFilament
Created by Zen Nitiruj on 5/22/2024 in #❓┊help
Is there anyway to reload RelationManager Owner page with Spa mode?
for other noobs like me that find this thread, this is how I applied it to my case: I have a Resource with a RelationManager. The Resource's ViewPage has a HeaderAction that updates the Resource's status. Based on this status, the RelationManager should also change, but it normally takes a page reload to see those changes. To trigger the page reload, I added $this->dispatch('status-updated'); to the HeaderAction in the ViewPage. Then back in the RelationManager, I added #[On('status-updated')] right before the class ExampleRelationManager extends RelationManager and after the imports. You gotta import use Livewire\Attributes\On; as well.
8 replies
FFilament
Created by umardi_ on 10/1/2024 in #❓┊help
Add Action Button on Topbar
that was fast haha good job maybe you'd like to add your solution here so future people can find it too?
4 replies
FFilament
Created by Taz416 on 6/9/2024 in #❓┊help
Relation Manager Lifecycle Hooks
I believe Action lifecycle hooks is what you (and I) were looking for:
CreateAction::make()
->beforeFormFilled(function () {
// Runs before the form fields are populated with their default values.
})
->afterFormFilled(function () {
// Runs after the form fields are populated with their default values.
})
->beforeFormValidated(function () {
// Runs before the form fields are validated when the form is submitted.
})
->afterFormValidated(function () {
// Runs after the form fields are validated when the form is submitted.
})
->before(function () {
// Runs before the form fields are saved to the database.
})
->after(function () {
// Runs after the form fields are saved to the database.
})
CreateAction::make()
->beforeFormFilled(function () {
// Runs before the form fields are populated with their default values.
})
->afterFormFilled(function () {
// Runs after the form fields are populated with their default values.
})
->beforeFormValidated(function () {
// Runs before the form fields are validated when the form is submitted.
})
->afterFormValidated(function () {
// Runs after the form fields are validated when the form is submitted.
})
->before(function () {
// Runs before the form fields are saved to the database.
})
->after(function () {
// Runs after the form fields are saved to the database.
})
4 replies
FFilament
Created by morty on 1/18/2024 in #❓┊help
When using multi-tenancy, is there a way to remain on the current resource when switching tenant?
@shenntek Good job on that PR, sad that it won't be accepted
9 replies
FFilament
Created by FerVillanuev4s on 6/6/2024 in #❓┊help
Read only mode
I have the same idea, like this: one panel per department in my company, where they go about their tasks, plus one "Overview" panel where every user can see all the data but not create, update, delete in any way. I'm using #bezhansalleh-shield, but as of now it has no multi-panel capabilities. So I got to edit every resource in that panel to remove table actions, page actions, etc, just so "Overview" can remain read-only
5 replies
FFilament
Created by Mark Chaney on 8/16/2024 in #❓┊help
ImportColumn relationship nullable
6 replies
FFilament
Created by Mark Chaney on 8/16/2024 in #❓┊help
ImportColumn relationship nullable
have you tried ->ignoreBlankState() ?
6 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
do you have something like
$member->phone
$member->phone
in your code? if $member is null, then you can't retrieve its phone
15 replies
FFilament
Created by King Dice on 6/28/2024 in #❓┊help
How to download failed rows?
5 replies
FFilament
Created by OnlyTieBowline on 11/1/2023 in #❓┊help
TextColumn relationship unique values
I do it like this, but probably it's not the "correct" way, though it works
->state(
fn($record) => $record->countries->map(fn($country) => $country->name)->unique()
)
->state(
fn($record) => $record->countries->map(fn($country) => $country->name)->unique()
)
5 replies
FFilament
Created by Jon Mason on 3/21/2024 in #❓┊help
text input field update based on another text input
live() is the same as reactive(), but newer and more aligned with Livewire
4 replies
FFilament
Created by Jon Mason on 3/21/2024 in #❓┊help
text input field update based on another text input
something like this?
->afterStateUpdated( fn(Set $set, $state) => $set('payment_amount', $state))
->afterStateUpdated( fn(Set $set, $state) => $set('payment_amount', $state))
4 replies
FFilament
Created by Hugo on 2/22/2024 in #❓┊help
Render hook not working for 'panels:sidebar-nav.start'
yes, me too, Class "Filament\View\Panels\PanelsRenderHook" not found. This works for me,
->renderHook(
name: 'panels::global-search.after',
hook: fn (): string => "Hello World!"
)
->renderHook(
name: 'panels::global-search.after',
hook: fn (): string => "Hello World!"
)
3 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
Thanks a lot for the support, toeknee!
26 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
Ahhh I see, makes sense
26 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
so I can basically call the Fieldset anything really, but then $get its fields through the ->relationship
26 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
Select::make('account_deal_id')
...
->live()
->afterStateUpdated(
function ($state, Set $set, Get $get) {
dd(
$get('deal_info'), null
$get('accountDeal'), related record OK
$get('accountDeal.id'), account_id OK
$get('accountDeal.status'), status OK

);
}
)
...

Fieldset::make('deal_info')
->relationship('accountDeal')
->schema([
Select::make('id')
->relationship('account')
...

Select::make('status')
...
]),
Select::make('account_deal_id')
...
->live()
->afterStateUpdated(
function ($state, Set $set, Get $get) {
dd(
$get('deal_info'), null
$get('accountDeal'), related record OK
$get('accountDeal.id'), account_id OK
$get('accountDeal.status'), status OK

);
}
)
...

Fieldset::make('deal_info')
->relationship('accountDeal')
->schema([
Select::make('id')
->relationship('account')
...

Select::make('status')
...
]),
26 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
I think you were on the right track. It wasn't about targetting the name of the Fieldset, but the relationship(?)
26 replies
FFilament
Created by MartinKnops on 1/9/2024 in #❓┊help
afterStateHydrated not working when using multiple Fieldset
Hey, wow, I got it
26 replies