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

Fixes button for multiple selections to behave correctly #1950

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

scireum-mbo
Copy link
Contributor

Additional Notes

  • This PR fixes or works on following ticket(s): OX-10886

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

@scireum-mbo scireum-mbo added the 🐛 Bugfix Contains only a small fix for an existing bug label Mar 11, 2024
if (!autocomplete.val().includes(code)) {
autocomplete.addToken({value: code, text: name});
} else {
autocomplete.select.removeTokenWithText(name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: I think the library may benefit from a removeTokenWithValue helper as this would be more robust than relying on unique display texts for each option (which most likely should be the case most of the time)

@scireum-mbo scireum-mbo merged commit 7773ab7 into develop Mar 13, 2024
4 checks passed
@scireum-mbo scireum-mbo deleted the feature/mbo/OX-10886 branch March 13, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bugfix Contains only a small fix for an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants