Open Vaccano opened 6 years ago
I was able to fix this by modifying the source:
I changed the scoreValue
subfunction's second and third lines to this:
if (value === null || typeof value === 'undefined') return 0;
value = String(value);
It was this:
if (value) return 0; value = String(value || '');
If value was 0 then this failed. And the second check was not needed because of the previous one.
If you have an item with the value of 1 in the list to search, it finds a match.
But if you have a value of 0 it is not matched on.
I found this when using selectize, which uses this library to perform the sorting. I had an id that was 0 and I could not get it to match on it. (Unfortunate because 0 is an important item in my list.)