survey-library: "keepIncorrectValues": true is ignored
Are you requesting a feature, reporting a bug or asking a question?
bug
What is the current behavior?
when I use "keepIncorrectValues": true
for a dropdown question and I run survey.clearIncorrectValues();
the value (that is not present in the choices array) is cleared
https://plnkr.co/edit/cHNJ3CqMAO5p7ydx
What is the expected behavior?
I would expect not as I am saying to keep it
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (15 by maintainers)
@masciugo You may have an issue in Survey Creator. I believe the following code will remove the issue:
If the defualt value in “getPropertyValue” is undefined, it will try to get the value from your property definition. If you set it to
false
you should be safe.Thank you, Andrew
@masciugo
survey.keepIncorrectValues
property is not serializable. You have to set it in the code:survey.keepIncorrectValues = true;
The reason we make it non-serializable, because a developer should decide should a survey/form keeps incorrect values or not. A Creator user should not think about it.Thank you, Andrew