We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I think that I found bug in your code. To start with, I have select field with data-source set like this:
data-source="[{value: 0, text: 'Pan'}, {value: 1, text: 'Pani'}]"
and when this fields is empty it says that I've select option called 'Pan'. I tried to debug your code and I found that in http://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.js at line 790 there is comparision with double =. See: if(value == itemValue) { result.push(o); }
if(value == itemValue) { result.push(o); }
In this case value is "", and itemValue = 0, so "" == 0 => true. I think that there should be tripple ===, and it will return false as it should be.
What do you think? And besides, thank you very much for this very great pice of code!
The text was updated successfully, but these errors were encountered:
In my investigation I've changed:
to
if(String(value) === String(itemValue)) { result.push(o); }
And in my case it works as expect, but I need make more tests. What do you think about that?
Sorry, something went wrong.
MarQuisKnox
No branches or pull requests
Hi,
I think that I found bug in your code. To start with, I have select field with data-source set like this:
data-source="[{value: 0, text: 'Pan'}, {value: 1, text: 'Pani'}]"
and when this fields is empty it says that I've select option called 'Pan'. I tried to debug your code and I found that in http://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.js at line 790 there is comparision with double =. See:
if(value == itemValue) { result.push(o); }
In this case value is "", and itemValue = 0, so "" == 0 => true. I think that there should be tripple ===, and it will return false as it should be.
What do you think? And besides, thank you very much for this very great pice of code!
The text was updated successfully, but these errors were encountered: