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

[UI][Admin] Wrong values displayed in autocomplete choice type #13571

Closed
benjamin-vauchel opened this issue Jan 31, 2022 · 0 comments
Closed
Labels
Bug Confirmed bugs or bugfixes. UX Issues and PRs aimed at improving User eXperience.

Comments

@benjamin-vauchel
Copy link

benjamin-vauchel commented Jan 31, 2022

Sylius version affected: 1.10.4

Description
When multiple ResourceAutocompleteChoiceType are used with the same choice_value (eg id), displayed values are overridden by the last saved one in session storage by semantic ui dropdown component.

Steps to reproduce
Create an entity Tag with a relation ManyToMany to Product
Create an entity Label with a relation ManyToMany to Product
Configure a ResourceAutocompleteChoiceType for Tag with choice_value=id
Configure a ResourceAutocompleteChoiceType for Label with choice_value=id
Create a new tag (with id 1)
Create a new label (with id 1)
Create a new product with the tag 1 and label 1

=> the displayed values for the tow autocomplete dropdown are the same
=> there is only 1 value saved in session storage with key 1

image

Possible Solution
Set the semantic UI dropdown option saveRemoteDatato false in sylius-auto-complete.js

GSadee added a commit that referenced this issue Jun 21, 2022
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.10
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #13571
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible)
 - Features and deprecations must be submitted against the master branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

40c3620 [UI] Disable session storage for autocomplete dropdowns
@lchrusciel lchrusciel added Bug Confirmed bugs or bugfixes. UX Issues and PRs aimed at improving User eXperience. labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes. UX Issues and PRs aimed at improving User eXperience.
Projects
None yet
Development

No branches or pull requests

2 participants