mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
[BREAKING CHANGE IN BETA]: More friendly URL parameters
This commit is contained in:
@@ -416,7 +416,14 @@ $data = $this->form->getState();
|
||||
|
||||
Filament v4 has renamed some of the URL parameters that are used on resource pages, to make them cleaner in the URL and easier to remember:
|
||||
|
||||
- `activeRelationManager` has been renamed to just `relation` on Edit / View resource pages.
|
||||
- `activeRelationManager` has been renamed to `relation` on Edit / View resource pages.
|
||||
- `activeTab` has been renamed to `tab` on List / Manage Relation resource pages.
|
||||
- `isTableReordering` has been renamed to `reordering` on List / Manage Relation resource pages.
|
||||
- `tableFilters` has been renamed to `filters` on List / Manage Relation resource pages.
|
||||
- `tableGrouping` has been renamed to `grouping` on List / Manage Relation resource pages.
|
||||
- `tableGroupingDirection` has been renamed to `groupingDirection` on List / Manage Relation resource pages.
|
||||
- `tableSearch` has been renamed to `search` on List / Manage Relation resource pages.
|
||||
- `tableSort` has been renamed to `sort` on List / Manage Relation resource pages.
|
||||
|
||||
To find out if you are using this parameter in your code, try searching for `'activeRelationManager' => ` (etc.) in your code, and looking for areas where you are using `::getUrl()` or another method of generating a URL with a parameter.
|
||||
</Disclosure>
|
||||
|
||||
@@ -17,7 +17,7 @@ use Livewire\Attributes\Url;
|
||||
|
||||
trait HasRelationManagers
|
||||
{
|
||||
#[Url]
|
||||
#[Url(as: 'relation')]
|
||||
public ?string $activeRelationManager = null;
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,31 +30,31 @@ class ListRecords extends Page implements Tables\Contracts\HasTable
|
||||
makeTable as makeBaseTable;
|
||||
}
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'reordering')]
|
||||
public bool $isTableReordering = false;
|
||||
|
||||
/**
|
||||
* @var array<string, mixed> | null
|
||||
*/
|
||||
#[Url]
|
||||
#[Url(as: 'filters')]
|
||||
public ?array $tableFilters = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'grouping')]
|
||||
public ?string $tableGrouping = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'groupingDirection')]
|
||||
public ?string $tableGroupingDirection = null;
|
||||
|
||||
/**
|
||||
* @var ?string
|
||||
*/
|
||||
#[Url]
|
||||
#[Url(as: 'search')]
|
||||
public $tableSearch = '';
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'sort')]
|
||||
public ?string $tableSort = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'tab')]
|
||||
public ?string $activeTab = null;
|
||||
|
||||
public function mount(): void
|
||||
|
||||
@@ -45,31 +45,31 @@ class ManageRelatedRecords extends Page implements Tables\Contracts\HasTable
|
||||
|
||||
public ?string $previousUrl = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'reordering')]
|
||||
public bool $isTableReordering = false;
|
||||
|
||||
/**
|
||||
* @var array<string, mixed> | null
|
||||
*/
|
||||
#[Url]
|
||||
#[Url(as: 'filters')]
|
||||
public ?array $tableFilters = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'grouping')]
|
||||
public ?string $tableGrouping = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'groupingDirection')]
|
||||
public ?string $tableGroupingDirection = null;
|
||||
|
||||
/**
|
||||
* @var ?string
|
||||
*/
|
||||
#[Url]
|
||||
#[Url(as: 'search')]
|
||||
public $tableSearch = '';
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'sort')]
|
||||
public ?string $tableSort = null;
|
||||
|
||||
#[Url]
|
||||
#[Url(as: 'tab')]
|
||||
public ?string $activeTab = null;
|
||||
|
||||
public static function getNavigationIcon(): string | BackedEnum | Htmlable | null
|
||||
|
||||
Reference in New Issue
Block a user