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

OptionList active prop not working on OptionDescriptor[] #12704

Open
emilisense opened this issue Sep 25, 2024 · 0 comments
Open

OptionList active prop not working on OptionDescriptor[] #12704

emilisense opened this issue Sep 25, 2024 · 0 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@emilisense
Copy link

emilisense commented Sep 25, 2024

Summary

In the OptionList component, the option for 'active' prop is not working:

<OptionList
        title="Inventory Location"
        onChange={setSelected}
        options={[
          {
            value: 'byward_market',
            label: 'Byward Market',
            active: true,
          },
          {value: 'centretown', label: 'Centretown'},
          {
            value: 'hintonburg',
            label: 'Hintonburg',
            active: true,
          },
          {value: 'westboro', label: 'Westboro'},
          {value: 'downtown', label: 'Downtown'},
        ]}
        selected={selected}
      />

it stays unchecked nevertheless if you pass true or false

Expected behavior

The checkboxes should be checked initially if active is set to true

Steps to reproduce

Link to sandbox

  1. Setup sample OptionList component
  2. Try changing the active option to true or false

Are you using React components?

Yes

Polaris version number

13.9.0 | 12.13.0

Browser

Edge

Device

Mac

@emilisense emilisense added Bug Something is broken and not working as intended in the system. untriaged labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant