MedicOneSystems / MedicOneSystems/livewire-datatables
Incorrect results when using simple array in filterable method.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
Using the code below produces the correct filter but not the corresponding string value in the grid results. If you use the column callback method the closure never returns the correct value.
Column::name('status')->label('Status')->filterable(['New', 'Approved, 'Seen', 'Completed'])
The following code returns the wrong value.
Column::callback('status', function ($value) {
return $value;
})->label('Status')->filterable(['New', 'Approved, 'Seen', 'Completed']),
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 by reproducing the two snippets using Column::name, Column::callback, and filterable with the listed status values. Trace how the filter selection and callback value reach the grid results; done means filtering still works and the displayed status value matches the selected record.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100