MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

If column is both searchable and editable then search results are not rendered correctly (highlights don't work) #385

Open nikitabuida opened 2 years ago

nikitabuida commented 2 years ago

изображение

This is clearly related to previously fixed issue #224 I found that if column was set to editable then such error occurs.

nikitabuida commented 2 years ago

There's also maybe related problem. If some column was declared searchable & editable but contains null value in database then if you use search application crashes with ErrorException Undefined array key "slot" (View: _path _to project\vendor\mediconesystems\livewire-datatables\resources\views\livewire\datatables\datatable.blade.php)

Again it is related to highlights (LivewireDatatable.php:1464): изображение

amardeepgp commented 2 years ago

On the columns , where we have the callback the search is not working on those.

sample code:

Column::name('test') ->callback(['test'], function ($test) { return $test== 1 ? 'Test1' : 'Test2'; }) ->label('Test Type') ->searchable(), Now when searching for Test1 or Test2 the search doesn't work.

Any suggestions?