Closed hectnandez closed 3 years ago
Thanks for this! I don't while understand the fix though - the condition is checking to see if a search term is submitted by the client-side. If it is, then it should be applied (which would correctly remove the null elements)?
ok..... found the real origin of the problem...
I'm using Laravel, and in the function \DataTables\Editor::process()
I set the parameter with the \Illuminate\Http\Request::toArray()
instead of the $_POST
directly
\Illuminate\Http\Request::toArray()
example:
$_POST
example:
In any case, the library should filter the null values?... instead the !empty()
we could use the !is_null()
I'm not sure how search.value
is becoming null
since it is submitted as an empty string. Is that Laravel doing that transformation?
Yes and no...
Laravel uses the library https://github.com/symfony/http-foundation
to handle all the requests and responses of the framework, somehow this library replaces the empty string value with ```null```` or at least the version that I'm using right now.
Since this is not a problem of this library I'm going to close this PR.
Thanks
[BUG[FIX] Filter null column values on the database
Datatable generated: Database rows: