MedicOneSystems / MedicOneSystems/livewire-datatables
how to filter value in array in columns? in method getAtrProperty
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
how to filter "blue" and "red" and "pink" in columns? in filterable
please see the code below :
, Column::callback(['color'],function ($color){
if ($color == 1){
return "blue";
}elseif($color == 2){
return "red";
}else{
return "pink";
}
})
->label('Status')
->filterable(['blue','red','pink'])
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
The issue mentions Column::callback, filterable, and getAtrProperty; start by tracing how callback values are handled during filtering. Confirm the expected behavior for blue, red, and pink, then verify that selecting each value returns the matching rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100