Can you have a "Next" and "Prev" button, inside an Edit page

use case: I wan to edit many records, but I need to enter edit page, click back to return to data table, click record, edit it, click back to return to data table after entering the edit page, I would like to click Next to take me to the edit page of the next record (of the data table) Does this make sense?
9 Replies
Mohamed Ayaou
Mohamed Ayaou2mo ago
Yeah, it makes sense, first there's a plugin with similar feature: https://filamentphp.com/plugins/jose-espinal-record-navigation
Filament
Record Navigation by José Espinal - Filament
Seamless navigation through records in a Filament resource's view.
Mohamed Ayaou
Mohamed Ayaou2mo ago
but not supprting RTL You can also customize the after edit/create redirect URLs of any resource
Mohamed Ayaou
Mohamed Ayaou2mo ago
Inspect the plugin soruce code to get an idea about how to implement it
Giant Robo
Giant RoboOP2mo ago
thanks! great find!
LeandroFerreira
LeandroFerreira2mo ago
Filament
Navigating Filament Pages with Previous and Next Buttons by Leandro...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
Giant Robo
Giant RoboOP2mo ago
@LeandroFerreira Nice, makes for some good reading. recently you told me about $component->getOptions() for a Select can I get use $component->getOptions() with $get() inside another form field?
Select::make('language_id')
->relationship('language', 'slug')

MarkdownEditor::make('code')
->afterStateHydrated(function
(MarkdownEditor $component, string $state, Get $get) {

//can I do something like this?
$get('language_id')->getOptions()
Select::make('language_id')
->relationship('language', 'slug')

MarkdownEditor::make('code')
->afterStateHydrated(function
(MarkdownEditor $component, string $state, Get $get) {

//can I do something like this?
$get('language_id')->getOptions()
$get('language_id') returns the id in the language table but I want the slug
LeandroFerreira
LeandroFerreira2mo ago
no.. I think you can use $component->getContainer()->getComponent(xx) to get language_id, but open a new topic please and explain what you are trying to do
Giant Robo
Giant RoboOP2mo ago
thanks, I'll do it tomorrow, thanks for your help today!

Did you find this page helpful?