You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you requesting a feature, reporting a bug or asking a question?
Bug
What is the current behavior?
In React version (maybe in others too but I use/noticed this in React) when the select2 widget is active, and the storeOthersAsComment is set to false and the dropdown question has the other option (hasOther: true), select the "Other" option and try to write something in the textarea. As soon as you type one key, it will add that as a new option in the dropdown (and it will be selected) and the textarea gets hidden.
What is the expected behavior?
When you select the "other" option you can type in the textarea as much as you want without hiding the field and adding it to the dropdown as a new option (so just like it behaves without storeOthersAsComment set to false).
How would you reproduce the current behavior (if this is a bug)?
Activate select2, add a dropdown question, then set the hasOther to true and also set the storeOthersAsComment to false.
Provide the test code and the tested page URL (if applicable)
@theAtaya I did not test it with react, but I am pretty sure that I have fixed the issue by the commit above.
The similar issue was in knockout. I add a condition that will not allow to add a new option if "other" option is choosen.
Are you requesting a feature, reporting a bug or asking a question?
Bug
What is the current behavior?
In React version (maybe in others too but I use/noticed this in React) when the select2 widget is active, and the
storeOthersAsComment
is set tofalse
and the dropdown question has the other option (hasOther: true
), select the "Other" option and try to write something in the textarea. As soon as you type one key, it will add that as a new option in the dropdown (and it will be selected) and the textarea gets hidden.What is the expected behavior?
When you select the "other" option you can type in the textarea as much as you want without hiding the field and adding it to the dropdown as a new option (so just like it behaves without storeOthersAsComment set to false).
How would you reproduce the current behavior (if this is a bug)?
Activate select2, add a dropdown question, then set the
hasOther
totrue
and also set thestoreOthersAsComment
tofalse
.Provide the test code and the tested page URL (if applicable)
From this page: https://surveyjs.io/Examples/Library?id=custom-widget-select2&platform=Reactjs&theme=bootstrap (Edit in...)
I created a new codesandbox fork and edited to reproduce the bug. It's nothing to do with
choicesByUrl
since it's reproducible with normal choices too.Tested page URL: https://codesandbox.io/s/xenodochial-fire-1lkbl
Test code
Specify your
The text was updated successfully, but these errors were encountered: