Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report - Issue when i delete column filter #617

Open
JoaVitoTavares opened this issue Jan 24, 2024 · 1 comment
Open

Bug Report - Issue when i delete column filter #617

JoaVitoTavares opened this issue Jan 24, 2024 · 1 comment

Comments

@JoaVitoTavares
Copy link

This issue occurs when i rapidly click to delete the column filter. Recently encountered a bug in my application and traced it to the following file:

mediconesystems/livewire-datatables/src/Http/Livewire/LivewireDatatable.php:1001

The line 1001 is: if (count($this->activeSelectFilters[$column]) < 1) { it belongs to the following function:

public function removeSelectFilter($column, $key = null)
{
unset($this->activeSelectFilters[$column][$key]);
$this->visibleSelected = $this->selected;
if (count($this->activeSelectFilters[$column]) < 1) {
unset($this->activeSelectFilters[$column]);
}
$this->setPage(1);
$this->setSessionStoredFilters();
}
When testing the same functionality on the livewire tables demo i encountered a similar problem in the "weapon names" column. Here's a screenshot for reference:

image

I conducted this test on the Google Chrome and Firefox utilizing a Linux Mint 19.3 system OS.

@JoaVitoTavares JoaVitoTavares changed the title Bug Report - Issue in Livewire Datatables Bug Report - Issue when i delete column filter Jan 24, 2024
@spekulatius
Copy link

This issue occurs when i rapidly click to delete the column filter. Recently encountered a bug in my application and traced it to the following file:

mediconesystems/livewire-datatables/src/Http/Livewire/LivewireDatatable.php:1001

The line 1001 is: if (count($this->activeSelectFilters[$column]) < 1) { it belongs to the following function:

public function removeSelectFilter($column, $key = null)
{
unset($this->activeSelectFilters[$column][$key]);
$this->visibleSelected = $this->selected;
if (count($this->activeSelectFilters[$column]) < 1) {
unset($this->activeSelectFilters[$column]);
}
$this->setPage(1);
$this->setSessionStoredFilters();
}
When testing the same functionality on the livewire tables demo i encountered a similar problem in the "weapon names" column. Here's a screenshot for reference:

image

I conducted this test on the Google Chrome and Firefox utilizing a Linux Mint 19.3 system OS.

I can confirm this bug. It's happening for our project as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants