Closed funkytaco closed 11 years ago
What bug does this cause? The numbers are just strings "45", and "45".toLowerCase() results in "45"
I should have said you're not catching the TypeError.
Uncaught TypeError: Object 1 has no method 'toLowerCase' grid.js:912
window.Grid.Root.jQueryPlugin.filter grid.js:912 (anonymous function)
Hmmm and how were you able to get that to come up? I can search numbers on my site without that coming up.
Thanks! On Oct 24, 2013 2:04 PM, "funkytaco" notifications@github.com wrote:
I should have said you're not catching the TypeError.
Uncaught TypeError: Object 1 has no method 'toLowerCase' grid.js:912
window.Grid.Root.jQueryPlugin.filter grid.js:912 (anonymous function)
— Reply to this email directly or view it on GitHubhttps://github.com/optikalefx/OpenJS-Grid/issues/37#issuecomment-27015457 .
I was able to duplicate the error.
This happens when the JSON data is not a string.
i.e. somejsondata: 1 as opposed to: somejsondata: "1"
But, I just remembered I'm using a raw json file and not your ajax.php and grid.php files. Oops.
Ah, that'll do it. I need to make updates to allow for a JSON loaded object.
Line 912 of grid.js tries to change numbers to lowercase var string = row[key].toLowerCase(); To reproduce, try to filter the grid with a number.
Even with the bug, filtering still works.