filament/filament
v3.2.108
v11.21.0
v3.5.6
v8.3.10
When adding multiple tabs and persisting them in the query, the cancel button goes to the previous tab instead of going to the previous page.
I know this is how the previous button in browser also works. But it really bugs our customers. We could overwrite the getCancelFormAction
function on the Create and Edit page, but seems there should be a general fix.
I don't know which way to go from here, but I'm happy to create a pull request when there is a possible fix. But just removing document.referrer ? window.history.back() :
in the cancel form action does not seem as a good fix, since it must be there for a reason.
Go to the previous page (or the index of the resource)
Forms\Components\Tabs::make('User')
->tabs([
Forms\Components\Tabs\Tab::make('User Info')
->schema([
Forms\Components\TextInput::make('name')
->required(),
Forms\Components\TextInput::make('email')
->email()
->required(),
Forms\Components\DateTimePicker::make('email_verified_at'),
]),
Forms\Components\Tabs\Tab::make('Security')
->schema([
Forms\Components\TextInput::make('password')
->password()
->required(),
]),
])
->persistTabInQueryString()
With above code sample, if you click through the tabs and click cancel, you go to the previous tab.
https://github.com/jyrkidn/filament-tabs-cancel
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too