© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
DanielvdSpoel

How to update form query after livewire parameter change

I currently have this code in a child component:
class BanTable extends Component implements HasForms, HasTable
{
    use InteractsWithForms;
    use InteractsWithTable;

    #[Reactive]
    public string $discord_id;

    public function table(Table $table): Table
    {
        return $table
            ->query(Ban::query()->where('userid', $this->discord_id))
            ->columns([
                Tables\Columns\TextColumn::make('moderatorid'),
                Tables\Columns\TextColumn::make('reason'),
                Tables\Columns\TextColumn::make('date'),
                Tables\Columns\TextColumn::make('bantime'),
            ])
            ->filters([
                //
            ])
            ->actions([
                //
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    //
                ]),
            ]);
    }

    public function render(): View
    {
        return view('livewire.tables.ban-table');
    }
}
class BanTable extends Component implements HasForms, HasTable
{
    use InteractsWithForms;
    use InteractsWithTable;

    #[Reactive]
    public string $discord_id;

    public function table(Table $table): Table
    {
        return $table
            ->query(Ban::query()->where('userid', $this->discord_id))
            ->columns([
                Tables\Columns\TextColumn::make('moderatorid'),
                Tables\Columns\TextColumn::make('reason'),
                Tables\Columns\TextColumn::make('date'),
                Tables\Columns\TextColumn::make('bantime'),
            ])
            ->filters([
                //
            ])
            ->actions([
                //
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    //
                ]),
            ]);
    }

    public function render(): View
    {
        return view('livewire.tables.ban-table');
    }
}

problem is that when discord_id updates, my table doesn't update. How can i go about this?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to trigger a Livewire component update after saving an Edit form?
FilamentFFilament / ❓┊help
2y ago
How to change Livewire Value
FilamentFFilament / ❓┊help
2y ago
Change Form Colors from Livewire Components
FilamentFFilament / ❓┊help
3y ago
How to use a parameter to change a resource table query?
FilamentFFilament / ❓┊help
2y ago