react-components icon indicating copy to clipboard operation
react-components copied to clipboard

feat(MultiSelect): Make sorting optional

Open ethanashaw opened this issue 9 months ago • 1 comments

Done

  • Add sortedAlphabetically?: boolean = true to MultiSelect, which determines whether to sort the items by name.
  • Add sortedBySelection?: boolean = true to MultiSelect, which determines whether to sort selected items first.

QA

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Ensure that MultiSelects without the new fields have not changed their sorting.
  • Ensure that MultiSelects with sortedAlphabetically={false} do not sort their items alphabetically.
  • Ensure that MultiSelects with sortedBySelection={false} do not sort selected items first.
image

Percy steps

No visual changes expected.

ethanashaw avatar Mar 20 '25 21:03 ethanashaw

:tada: This PR is included in version 2.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jun 04 '25 16:06 github-actions[bot]