Skip to content

bug: Selected options not set with ion-select multiple and compareWith #24742

Closed

Description

@sean-perkins

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When using an ion-select with multiple and compareWith, the ion-select will display the selected value in the label, but when the select is opened, the option does not show as selected.

Video from reproduction:

ionic-select-bug.mov

Expected Behavior

When an ion-select has a default value, it should display as selected/checked in the opened state.

Steps to Reproduce

  1. Use an ion-select with multiple="true" and a compareWith function
  2. Set a default vale on the ion-select to one of the options passed to the select
  3. Notice: The ion-select value label displays the selected option's text
  4. Open the select (click)
  5. Notice: The ion-select does not display any selected value.

Code Reproduction URL

https://github.com/adamduren/ionic-default-selection-option-bug

Ionic Info

N/A

Additional Information

No response

Activity

  1. added
    package: core
    type: bug
    on Feb 8, 2022
  2. ionitron-bot commented on Mar 11, 2022

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  3. locked and limited conversation to collaborators on Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions