rappasoft/laravel-livewire-tables

[Bug]: setSearchDebounce(1000) has no effect

saleemepoch opened this issue · 7 comments

What happened?

I have the table configured as follows:
public function configure(): void { $this->setPrimaryKey('id'); $this->setPerPage(25); $this->setSearchDisabled(); $this->setSearchDebounce(1000); $this->setDebugEnabled(); }
I have the columns configured as follows:
Column::make("Firstnames") ->secondaryHeader($this->getFilterByKey('firstnames')) ->sortable() ->searchable(),
However, the search is not triggered until my mouse goes out of focus.

How to reproduce the bug

The search is not triggered upon very keystroke, only when I click outside the search box.

Package Version

3.1.5

PHP Version

8.2.x

Laravel Version

10.38

Alpine Version

No response

Theme

Tailwind 3.x

Notes

No response

Error Message

No response

Are you referring to the secondary header, or the independent search box?

The secondary header

Thanks for the information, can you share the code relating to the Column in question please

The issue affects all columns, and what I have is pretty standard:

public function columns(): array
    {
        return [
            Column::make("ID", "id")
                ->sortable()
                ->deselected(),
            Column::make("Firstnames")
                ->secondaryHeader($this->getFilterByKey('firstnames'))
                ->sortable()
                ->searchable(),
            Column::make("Lastname")
                ->secondaryHeader($this->getFilterByKey('lastname'))
                ->sortable()
                ->searchable(),
            Column::make("Email")
                ->secondaryHeader($this->getFilterByKey('email'))
                ->sortable(),
....

This is my configuration:


    public function configure(): void
    {
        $this->setPrimaryKey('id');
        $this->setPerPage(25);
        $this->setSearchDisabled();
        $this->setSearchDebounce(1000);
    }

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If you remove setSearchDisabled()

Type something into the search box, and wait 1 second before doing anything else

Does it then update?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.