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

[RFR] Display selected choices in their selection order in SelectArrayInput #2806

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

Luwangel
Copy link
Contributor

@Luwangel Luwangel commented Jan 24, 2019

The behavior of the SelectArrayInput doesn't follow the way they are stored. I've changed the render method in the SelectArrayInput component in order to fix this.

In addition, this change respects the Multiple Select demo in Material-UI.

Scenario

In the following screenshot, we can find on the left the new version*, and on the right the old version.

Selection order:

  • (1) Compulsive
  • (2) Reviewer
  • (3) Regular

Choices order:

  • (1) Compulsive
  • Collector
  • Ordered once
  • (3) Regular
  • Returns
  • (2) Reviewer

We notice that without this PR, the SelectArrayInput displays the items in the choices order instead of the selection order. However, in the storage, the items are ordered following the user selection order.

selection_001

Todo

  • Change the renderValue method in SelectArrayInput to display selected choices in their selection order

@fzaninotto fzaninotto merged commit 177fb8b into master Jan 24, 2019
@fzaninotto
Copy link
Member

Excellent, thanks!

@fzaninotto fzaninotto deleted the fix-select-array-input branch January 24, 2019 10:12
@fzaninotto fzaninotto added this to the 2.6.3 milestone Jan 24, 2019
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.

2 participants