Noxo
Noxo
FFilament
Created by Noxo on 3/3/2024 in #❓┊help
Pagination inside modal
Any idea how to implement pagination inside modal? It would be ideal to implement infinite scrolling, but this is still a dream. i tried a way with pagination component but got redirect to - https://demo.test/livewire/update?page=3 with error: The GET method is not supported for route livewire/update. Supported methods: POST. My code: Action class
class StockHistory extends Action
{
public static function getDefaultName(): ?string
{
return 'stock-history';
}

protected function setUp(): void
{
parent::setUp();

$this->label(__('admin.actions.stock_history.label'));
$this->modalHeading(__('admin.actions.stock_history.heading'));
$this->slideOver();
$this->modalSubmitAction(false);
$this->modalCancelAction(false);
$this->color(ColorService::blue());
$this->modalWidth(MaxWidth::Medium);
$this->modalContent(function ($record): View {
$history = $record->stockHistory()->paginate(4);

return view('filament.stock-history', ['history' => $history]);
});
}
}
class StockHistory extends Action
{
public static function getDefaultName(): ?string
{
return 'stock-history';
}

protected function setUp(): void
{
parent::setUp();

$this->label(__('admin.actions.stock_history.label'));
$this->modalHeading(__('admin.actions.stock_history.heading'));
$this->slideOver();
$this->modalSubmitAction(false);
$this->modalCancelAction(false);
$this->color(ColorService::blue());
$this->modalWidth(MaxWidth::Medium);
$this->modalContent(function ($record): View {
$history = $record->stockHistory()->paginate(4);

return view('filament.stock-history', ['history' => $history]);
});
}
}
Template file
{{ $history }}

<x-filament::pagination :paginator="$history" />
{{ $history }}

<x-filament::pagination :paginator="$history" />
4 replies
FFilament
Created by Noxo on 11/7/2023 in #❓┊help
Version switcher
No description
4 replies
FFilament
Created by Noxo on 11/1/2023 in #❓┊help
EditAction hooks
does EditAction have hooks like these: afterCreate, afterSave, beforeValidate? Filament\Tables\Actions\EditAction
9 replies
FFilament
Created by Noxo on 10/30/2023 in #❓┊help
Clarification regarding saving logic
No description
2 replies
FFilament
Created by Noxo on 10/26/2023 in #❓┊help
update url
I need to update the URL when the form is changed. I have a simple form on my page:
public function form(Form $form): Form
{
return $form
->schema([
Select::make('user')->options([1,2,3]),
])
->debounce()
->statePath('data');
}
public function form(Form $form): Form
{
return $form
->schema([
Select::make('user')->options([1,2,3]),
])
->debounce()
->statePath('data');
}
It works great, but I need to update the URL GET parameters when the form is changed, similar to filters on the resource table. I have no idea how to update the URL. I had investigated the table filters, but I didn't find what I need.
4 replies
FFilament
Created by Noxo on 10/21/2023 in #❓┊help
ViewEntry - poll
No description
5 replies
FFilament
Created by Noxo on 10/20/2023 in #❓┊help
Submit - requiresConfirmation
Do you know why requiresConfirmation doesn’t work with submit action? I override the getCreateFormAction method on create page and add requiresConfirmation but no confirmation on submitting 🤷‍♂️
protected function getCreateFormAction(): Action
{
return Action::make('create')
->label(__('filament-panels::resources/pages/create-record.form.actions.create.label'))
->requiresConfirmation()
->submit('create')
->keyBindings(['mod+s']);
}
protected function getCreateFormAction(): Action
{
return Action::make('create')
->label(__('filament-panels::resources/pages/create-record.form.actions.create.label'))
->requiresConfirmation()
->submit('create')
->keyBindings(['mod+s']);
}
3 replies
FFilament
Created by Noxo on 9/26/2023 in #❓┊help
Navigation - groups->collapsed
is there a way to mark all groups collapsed? the groups registered from resources, like this:
protected static ?string $navigationGroup = 'Settings';
protected static ?string $navigationGroup = 'Settings';
8 replies
FFilament
Created by Noxo on 9/24/2023 in #❓┊help
Repeater - formatStateUsing
No description
3 replies
FFilament
Created by Noxo on 9/22/2023 in #❓┊help
ActionGroup->badge
No description
3 replies
FFilament
Created by Noxo on 9/22/2023 in #❓┊help
afterCreate - hook
Hi 👋 I have a creation form inside a modal (without Pages/CreateUser.php). How can i call afterCreate ?
6 replies
FFilament
Created by Noxo on 9/18/2023 in #❓┊help
Section - headerEnd
No description
6 replies
FFilament
Created by Noxo on 9/17/2023 in #❓┊help
Navigation Sorting
No description
5 replies
FFilament
Created by Noxo on 9/2/2023 in #❓┊help
DatePicker - range
Does the DatePicker have a date range?
4 replies
FFilament
Created by Noxo on 8/28/2023 in #❓┊help
Chart widget filter - spins forever
No description
16 replies