bionary
bionary
FFilament
Created by mwema on 4/15/2023 in #❓┊help
Is it possible to hook to the table reorder event, when someone clicks the tick after reordering?
For anyone looking to fire the Spatie table sorting event like I was, here is some working code: (this is for a relation-manager)
public function reorderTable(array $order, int | string | null $draggedRecordKey = null): void
{
$relation = $this->ownerRecord->{self::$relationship};
if ($relation instanceof \Illuminate\Database\Eloquent\Collection && $relation->isNotEmpty()) {
$class = get_class($relation->first());
}else{
$class = get_class($relation);
}
$class::setNewOrder($order);
}
public function reorderTable(array $order, int | string | null $draggedRecordKey = null): void
{
$relation = $this->ownerRecord->{self::$relationship};
if ($relation instanceof \Illuminate\Database\Eloquent\Collection && $relation->isNotEmpty()) {
$class = get_class($relation->first());
}else{
$class = get_class($relation);
}
$class::setNewOrder($order);
}
I have no idea if this is the best way to do this, but the EloquentModelSortedEvent is fired. I removed parent::reorderTable($order, $draggedRecordKey); because then the update queries are unnecessarily run twice.
9 replies
FFilament
Created by mwema on 4/15/2023 in #❓┊help
Is it possible to hook to the table reorder event, when someone clicks the tick after reordering?
No, my intention was not meant to be in anyway demanding.
9 replies
FFilament
Created by mwema on 4/15/2023 in #❓┊help
Is it possible to hook to the table reorder event, when someone clicks the tick after reordering?
Still no hook in 2025? It's frustrating because when using Spatie Elequent-Sortable, that package's ::newSortOrder() never gets triggered by Filament so we can't listen for the table sorting event on completion. Feature Request?!? @Dan Harrin So I tried to hook into a model event with ... ->wasChanged('order_column') doesn't work either, so it's impossible to work with table sorting events.
9 replies
FFilament
Created by Emruardo on 3/2/2025 in #❓┊help
Grouping month year and group summarize (total amount)
Thank you dearly for this. I can now go put some ice on the bruises on my head!
10 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
@Dennis Koch sounds about right
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
@Dennis Koch oh sweet. Working with Wordpress is a nightmare. Doing the simplest things (for example: adding images) will make anyone want to jump off a building. I had to build a custom Wordpress plugin just to handle areas where the awful, antiquated and often incomplete WordPress API documentation falls short.
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
Thanks Adam
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
Well I just talked myself into refactoring it that way!
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
It will all happen once the dropdown is selected and I won't get to see the form filled, no big deal.
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
But like I said, I can do this no problem from the index.
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
I can create categories but was going to implement a way to import/link exisiting categories.
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
I did it years ago. it runs one of my businesses
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
it's such a mess and wordpress is the absolute worst...but it all works I tell ya
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
images, formatting everthing 🙂
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
1000s of articles without ever touching wordpress!
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
I built a personal system that posts to all kinds of websites
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
Yes, been doing that for years!
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
The select is for getting the heirarchy of the wordpress categories. (parent / child)
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
The API is from one of my wordpress websites. and my Filament app manages this website and several others.
85 replies
FFilament
Created by bionary on 3/12/2025 in #❓┊help
form->fill()`with Selects?
Yeah, this is a tough one...sorry Adam !!!
85 replies