F
Filament7d ago
Jort

Weird issue with reorder button on test/prod, but not on localhost.

I've recently discovered a strange issue with the reorderable() trait where the 'save' button moves to the right instead of staying on the left, where the button is supposed to be. Expected (on localhost): Image 1 and 2. Actual (on test/prod servers): Image 3 and 4 Additional notes: This only happens on test/prod servers, and only happens on tables within a relation manager. It happens both with or without the reorderRecordsTriggerAction
ChaptersRelationManager.php

public function table(Table $table): Table
{
return ChapterResource::table($table)
->reorderable('sort_order')
->reorderRecordsTriggerAction(
fn (Action $action, bool $isReordering) => $action
->button()
->label($isReordering ? 'Save' : 'Enable reordering'),
)
->defaultSort('sort_order')
->headerActions([
CreateAction::make(),
])->recordUrl(function (Chapter $chapter) {
return ChapterResource::getUrl('edit', ['record' => $chapter]);
});
}
ChaptersRelationManager.php

public function table(Table $table): Table
{
return ChapterResource::table($table)
->reorderable('sort_order')
->reorderRecordsTriggerAction(
fn (Action $action, bool $isReordering) => $action
->button()
->label($isReordering ? 'Save' : 'Enable reordering'),
)
->defaultSort('sort_order')
->headerActions([
CreateAction::make(),
])->recordUrl(function (Chapter $chapter) {
return ChapterResource::getUrl('edit', ['record' => $chapter]);
});
}
Interestingly, when I create a new table and define columns instead of using the existing resource (and remove the filters), the button is inline, yet still moves to the right. Image 5. Once again, only on test/prod. I have ran composer update, npm run build, tried different browsers and incognito mode and emptied caches. All without success. Hopefully someone else has encountered this issue before, or can lead me into the right direction to solve this.
No description
No description
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?