© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
morty

Sorry this might be dumb, but how can I extend a method that returns a component with additional...

This might be a PHP question more than a Filament question but I'll ask anyway.

I'm trying to extend the default login of Filament to add a tab index attribute to the remember me input. This is what I tried:

protected function getRememberFormComponent(): Component
{
    $component = parent::getRememberFormComponent();

    return $component->extraInputAttributes(['tabindex' => 3]);
}
protected function getRememberFormComponent(): Component
{
    $component = parent::getRememberFormComponent();

    return $component->extraInputAttributes(['tabindex' => 3]);
}


Unfortunately this doesn't work, there is no
extraInputAttributes
extraInputAttributes
method on the component returned from the parent method.

I could just copy the method to override it and add my change but I wanted to avoid any issues with future updates to this method from Filament.
Solution
It should recognize it. Maybe it just needs to reindex.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to create a hidden method for this component?
FilamentFFilament / ❓┊help
15mo ago
How can I render a PDF using a Livewire component that implements HasInfolists?
FilamentFFilament / ❓┊help
3y ago
How to add a method to a custom component?
FilamentFFilament / ❓┊help
2y ago
How to extend ViewResource but show a custom view?
FilamentFFilament / ❓┊help
3y ago