delboy1978uk
delboy1978uk
FFilament
Created by delboy1978uk on 2/17/2025 in #❓┊help
Modal with relationship table crud
ah nice, thank you once again!
8 replies
FFilament
Created by delboy1978uk on 2/17/2025 in #❓┊help
Modal with relationship table crud
@Dennis Koch thank you so much for your help, I now have a modal with a custom view, is it possible though to use a table object using a default filament view?
8 replies
FFilament
Created by delboy1978uk on 2/17/2025 in #❓┊help
Modal with relationship table crud
ah is that how you do it?
// from docs
$action = Action::make('advance')
->action(fn (Contract $record) => $record->advance())
->modalContent(fn (Contract $record): View => view(
'filament.pages.actions.advance',
['record' => $record],
))

// and so
ViewColumn::make('step_count')
->view('tables/columns/step-count')
->action($action)
// from docs
$action = Action::make('advance')
->action(fn (Contract $record) => $record->advance())
->modalContent(fn (Contract $record): View => view(
'filament.pages.actions.advance',
['record' => $record],
))

// and so
ViewColumn::make('step_count')
->view('tables/columns/step-count')
->action($action)
like that?
8 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
It did, thank you once again @toeknee 🙏
12 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
The listener works great, thank you so much @toeknee !
12 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
a listener sounds like the best way to go i think, i'll look that up. Thank you once again!
12 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
@toeknee thanks so much! 🙏❤️ are you also able to advise on a header action button being refreshed too? next to my delete button on my edit page i have a custom button, that once pressed, should instead display a cancel button, currently i need to refresh the page to see that too
protected function getHeaderActions(): array
{
// $release = Action::make ..
// $cancel = Action::make ..
// 4delete = DeleteAction::make ..

return $releaseService->isReleased($this->record) ? [$cancel, $delete] : [$release, $delete];
}
protected function getHeaderActions(): array
{
// $release = Action::make ..
// $cancel = Action::make ..
// 4delete = DeleteAction::make ..

return $releaseService->isReleased($this->record) ? [$cancel, $delete] : [$release, $delete];
}
12 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
code now looks like this
->columns([
Tables\Columns\ViewColumn::make('root step')
->state(function (ItemProcessStep $step) use ($rootStep): string {
return $rootStep === $step->id ? 'checked ' : '';
})
->action(function (ItemProcessStep $step) {
$this->ownerRecord->root_step_id = $step->id;
$this->ownerRecord->save();
$this->resetTable();
})
->view('tables.columns.root-step-radio', ['rootStep' => $rootStep]),
->columns([
Tables\Columns\ViewColumn::make('root step')
->state(function (ItemProcessStep $step) use ($rootStep): string {
return $rootStep === $step->id ? 'checked ' : '';
})
->action(function (ItemProcessStep $step) {
$this->ownerRecord->root_step_id = $step->id;
$this->ownerRecord->save();
$this->resetTable();
})
->view('tables.columns.root-step-radio', ['rootStep' => $rootStep]),
12 replies
FFilament
Created by delboy1978uk on 2/13/2025 in #❓┊help
Refresh a table
I tried resetTable() as well but it didn't work either, nothing happens
12 replies