-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with search in Type INT for NumberColumn #349
Comments
Stale issue message |
Still relevant. But there are more cases to handle like. +12123 or -1231313 or over/under max INT_VALUES |
I believe the correct course of action would be to override |
why do you think so? for numeric fields we should be able to do range, same for DateTime fields. |
Fair enough, but point remains that |
Stale issue message |
The NumberColumn does a check it it is valid for search. It checks with is_numeric.
https://github.com/omines/datatables-bundle/blob/master/src/Column/NumberColumn.php#L53
If the field is of type
int
, there is an error if you search for partial dates like30.05
this is valid foris_numeric()
.But that will raise an error.
An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "30." LINE 1: ...ce_name) LIKE '%30.%'
Possible solution.
Check if type is int and change the check.
Or a new ColumnType?
The text was updated successfully, but these errors were encountered: