F
Filamentβ€’11mo ago
bdm-laravel

Forms\Components\Select::make('country_id') this dropdown is lagging

I have images that it take 5 sec to get it correct drowdown and i try many cache command php artisan view:cache php artisan route:cache php artisan config:cache php artisan icons:cache This is the code Forms\Components\Section::make('Address Details') ->schema([ Forms\Components\Select::make('country_id') ->relationship(name: 'country', titleAttribute: 'name') ->searchable() ->preload() ->multiple() ->required(), Forms\Components\Select::make('state_id') ->relationship(name: 'state', titleAttribute: 'name') ->searchable() ->preload() ->multiple() ->required(), Forms\Components\Select::make('city_id') ->relationship(name: 'city', titleAttribute: 'name') ->searchable() ->preload() ->multiple() ->required(), Forms\Components\Select::make('department_id') ->relationship(name: 'department', titleAttribute: 'name') ->searchable() ->preload() ->multiple() ->required(), ])->columns(3), There are too images are attach there image where it takes time to load or lag and in 5 sec than it get corrected it self Need your help
No description
No description
17 Replies
Brian.
Brian.β€’11mo ago
Do you by any chance use the Adblocker extension?
bdm-laravel
bdm-laravelOPβ€’11mo ago
No i checked.
Bonux
Bonuxβ€’11mo ago
Have you tried disabling the view collector from debugbar? As the filament renders out a bunch of views the debugbar usually causes the page to slow down a bunch. Try to publish the configuration: php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider" and in the config/debugbar.php find the collectors array and set the views => false
bdm-laravel
bdm-laravelOPβ€’11mo ago
okay, let me try once hi now there is difference in it but then too it is visible issues i cant take screenshots because it is fast, the issue get self corrected, need more help in it
Brian.
Brian.β€’11mo ago
Yeah you mean you see the select being initialized?
Brian.
Brian.β€’11mo ago
Brian.
Brian.β€’11mo ago
like this?
bdm-laravel
bdm-laravelOPβ€’11mo ago
YES YES YES PLEASE HELP ME IN THIS
Brian.
Brian.β€’11mo ago
Yeah, it does that because it's searchable(), which means it doesn't use the native select, but uses their customizable select instead. And that needs to load in. I'm not sure if you can fix that in a way. I think that needs to be preloaded by Filament itself. Or making a completely custom select. I'm relatively new to Filament, I assume others might know more
shettyanna_dev
shettyanna_devβ€’11mo ago
Thanks for your tip, Brian NEED MORE HELP IN THIS MATTER, Filament Expert kindly look into this master
awcodes
awcodesβ€’11mo ago
that's just the browser and how long it takes to load the js and run it. There's not really anything you can do about it. Alpine components are loaded asynchronously, so when you're not in dev mode or have dev tools open the browser will cache the js file and it will be faster.
shettyanna_dev
shettyanna_devβ€’11mo ago
Sir, you have seen this correct its happening to me in my saas application so what is the alternative or solution for this dropdown thing
shettyanna_dev
shettyanna_devβ€’11mo ago
I did get your point, but then too, I have some doubts about using the filament panel form dropdown, in case it also reacts the same way in production too, then what? Need your advice in this matter
awcodes
awcodesβ€’11mo ago
my advice is that it is ok. there's nothing you can do about it. nor can you control your users internet speeds. or make your own dropdown component that doesn't use async loading and instead loads with every page regardless of if the component is being used or not.
shettyanna_dev
shettyanna_devβ€’11mo ago
Then you say it's not an issue, correct? If it is not, then I can proceed with it and check later if it is working fine on live.
awcodes
awcodesβ€’11mo ago
it's not an issue in my eyes.
shettyanna_dev
shettyanna_devβ€’11mo ago
Thanks for your Support, Sir, Having fun using fi πŸ‘
Want results from more Discord servers?
Add your server