Skip to content

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

Merged
fzaninotto merged 1 commit into
masterfrom
fix-select-array-input
Jan 24, 2019
Merged

fzaninotto merged 1 commit into
masterfrom
fix-select-array-input

Conversation

@Luwangel

@Luwangel Luwangel commented Jan 24, 2019 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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