MedicOneSystems / MedicOneSystems/livewire-datatables
Bug Report - Issue when i delete column filter
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
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:
I conducted this test on the Google Chrome and Firefox utilizing a Linux Mint 19.3 system OS.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in mediconesystems/livewire-datatables/src/Http/Livewire/LivewireDatatable.php, at removeSelectFilter around line 1001, and reproduce the issue by rapidly deleting a column filter. Compare the behavior with the weapon names filter on the linked demo; done means repeated deletion no longer produces the reported failure and the filter state remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100