Focus on relation manager on page load
Is it possible to autofocus on the relation manager group instead of the edit form? I want the user to see the relation manager after record creation so they don't have to see the same form again.
5 Replies
If you're on v3, you could use a one-off JS function to scroll to the bottom of the page when it loads
Laravel
Actions | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
$this->js(scroll-to-bottom-call);
$this->js("window.scrollTo(0, document.body.scrollHeight);")
should work
You'll have to override the mount()
function I thinkThanks for the answer. Where do I have to put that code..in the resource file itself (app\Filament\Resources\ExampleResource.php) or in the edit page of that resource file (app\Filament\Resources\ExampleResource\Pages\EditExample.php)?
It looks like you want this to apply on the Edit page, so you would put it in
EditExample.php