Timster8989
Timster8989
FFilament
Created by malebestia. on 10/11/2023 in #❓┊help
cookie law and GDPR
Found anything?
6 replies
FFilament
Created by Consignr on 11/14/2023 in #❓┊help
afterStateUpdated() not running on custom component
Hi! Did you find any solution to this?
6 replies
FFilament
Created by Prodex on 9/27/2023 in #❓┊help
How to display loading indicator in widget
Awesome, thank you so much!
5 replies
FFilament
Created by Prodex on 9/27/2023 in #❓┊help
How to display loading indicator in widget
Even figure this one out? Page with many widgets looks terrible when loading 😦
5 replies
FFilament
Created by Timster8989 on 11/8/2023 in #❓┊help
View column javascript
I ended up solving this in the following way: this to table definition:
->header(fn () => self::getToggler())
->header(fn () => self::getToggler())
This as a separate function:

public static function getToggler(){
$html = \Illuminate\Support\Facades\View::make('tables.candidate-header')->render();
return new HtmlString($html);
}

public static function getToggler(){
$html = \Illuminate\Support\Facades\View::make('tables.candidate-header')->render();
return new HtmlString($html);
}
And inside the view file I have just plain vanilla JS.
<script>
function toggle_visibility(id) {
var short = document.getElementById("short_summary"+id);
var long = document.getElementById("long_summary"+id);

if (short.style.display == 'block') {
short.style.display = 'none';
long.style.display = 'block';
} else {
short.style.display = 'block';
long.style.display = 'none';
}
}
</script>
<script>
function toggle_visibility(id) {
var short = document.getElementById("short_summary"+id);
var long = document.getElementById("long_summary"+id);

if (short.style.display == 'block') {
short.style.display = 'none';
long.style.display = 'block';
} else {
short.style.display = 'block';
long.style.display = 'none';
}
}
</script>
I still wonder though whether there is a more elegant way to handle this, but at least this works.
4 replies
FFilament
Created by Timster8989 on 10/30/2023 in #❓┊help
Custom table component + javascript library
Thanks Saade! However, my problem is not loading the script for Filament in general, for this I use exactly the AppProvider to register it. It's loaded on the page. Problem is, that my Column view file is unable to use it (I believe it's a LiveWire component, which loads via ajax after all).
4 replies
FFilament
Created by Timster8989 on 10/10/2023 in #❓┊help
Widget order on a panel
Thank you so much for your help! This was entirely my own stupidity; I had to include the "dashboard" using render hook as passing main page javascript to widgets turned out to be little problematic. Trying to get around this by using "panels::page.footer-widgets.before" render hook. Unfortunately:
public function getFooterWidgets(): array
{
return [
\App\Filament\Widgets\FooterWidget::class,
];
}`
public function getFooterWidgets(): array
{
return [
\App\Filament\Widgets\FooterWidget::class,
];
}`
Inside the Dashboard.php page results in "Unable to find component: [app.filament.widgets.footer-widget]". This happens even if I have nothing defined inside the widget. Maybe I'm again misunderstanding something?
11 replies
FFilament
Created by Timster8989 on 10/10/2023 in #❓┊help
Widget order on a panel
No description
11 replies
FFilament
Created by @uwascan on 9/21/2023 in #❓┊help
Selective Multi-tenancy
I have all my models extend one base model which defines QueryLimiter. Inside this I define limits for each table that requires multi tenancy. This helps to keep limit logic in one place and keeps the code very compact. Beauty of Eloquent.
17 replies
FFilament
Created by alexanderkroneis on 10/5/2023 in #❓┊help
Move Relationship Manager into a Tab
How about repurposing side-menu plugin for this? I have same done with that, but menu options are on the side. Shouldn’t be a big thing to move it to tabs.
11 replies
FFilament
Created by Timster8989 on 10/3/2023 in #❓┊help
Custom Javascript inside widget
Amazing, thank you so much @DrByte ! This did indeed solve my dilemma.
4 replies
FFilament
Created by Timster8989 on 9/17/2023 in #❓┊help
Related record, pivot extra column values
For anyone else stumbling here, here would be how to do it via the relation definition: public function role() { return $this->belongsToMany(\App\Models\BaseModels\Bouncer\Roles::class,'assigned_roles','entity_id','role_id','id','id')->withPivotValue('entity_type','App\Models\User'); }
3 replies
FFilament
Created by NeerGreeN on 9/17/2023 in #❓┊help
Relationship between two dependent select fields
You didn't say whether you are in v3. But if you are, check here: https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query Disabling specific options
11 replies
FFilament
Created by Timster8989 on 9/9/2023 in #❓┊help
Hiding "Dashboard" from a dashboard
Thanks @wyChoong and @gdg1977 ! So turns out that the problem was I was extending BasePage instead of Dashboard. Duh. I clarified documentation a little on this, not to have others falling into this.
11 replies
FFilament
Created by Timster8989 on 9/9/2023 in #❓┊help
Hiding "Dashboard" from a dashboard
Thanks a million for chipping in! Are you on version3? As you can see from my example, I have it defined, but no help. 😦
11 replies
FFilament
Created by Timster8989 on 9/8/2023 in #❓┊help
Understanding view rendering
Let me know when you do, I'm sure to be first in line. 🙂
41 replies
FFilament
Created by Timster8989 on 9/8/2023 in #❓┊help
Understanding view rendering
I was running circles, because there is also FilamentAsset::register ... and for some funny reason my page doesn't have tailwind unless I include it from there -> it breaks other stuff. But I'll figure it out now that I got past the biggest stumbling block in understanding.
41 replies