Skip to content
New issue

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

Clear incorrect values if needed on question validation in select base #9482

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

andrewtelnov
Copy link
Member

No description provided.

@tsv2013 tsv2013 merged commit d1ac223 into master Feb 19, 2025
5 checks passed
@tsv2013 tsv2013 deleted the bug/9478-select-clearincorrect-onvalidation branch February 19, 2025 13:15
@tylers
Copy link

tylers commented Mar 14, 2025

I believe this change broke the ability to select options that were retrieved from external sources when applying the select2 processResults() method.

If you use select2 initialization with the tagbox element, then fetch new options based on the query/term entered. Once you select an option, you can verify the question will have it's value updated with SurveyJS's onValueChanged() method. But it will immediately remove that option from the value and onValueChanged() will fire again.

In this example:

  • click on tagbox question and it opens the dropdown panel
  • search for term '99'
  • new options are fetched and added to the panel
  • select a new option
  • onValueChanged() is updated with value ['99']
  • onValueChanged() is updated with value []

I'm not sure if this is the change that caused it but the functionality broke between 1.12.23 and 1.12.24 and this is the ticket that seems the most likely to have caused it. I don't have a sandbox to demonstrate and I couldn't find an example that retrieves options with select2 on the site to extend.

Issue 9603 created

@tsv2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants