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

When SelectControl is multiple, the styles are broken #46623

Closed
jakeparis opened this issue Dec 16, 2022 · 2 comments
Closed

When SelectControl is multiple, the styles are broken #46623

jakeparis opened this issue Dec 16, 2022 · 2 comments
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@jakeparis
Copy link
Contributor

Description

I've added the multiple prop to the <SelectControl />, and the rendered component doesn't look like a multi-select control. So I added my own style to increase the height of the element (so more than one element is visible at the same time, but is is still impossible to scroll the list. So I've also needed to add overflow: auto to the list to override the core style of overflow: hidden, and now it scrolls.

But even though these changes restored the functionality of the multi-select, increasing the height of the component resulted in the "dropdown" arrow on the right floating strangely.

Step-by-step reproduction instructions

  1. add <SelectControl multiple options={[{label:'a',value:'a'},{label:'b',value:'b'},{label:'c',value:'c'},{label:'d',value:'d'},{label:'e',value:'e'},{label:'f',value:'f'},{label:'g',value:'g'},{label:'h',value:'h'},{label:'i',value:'i'},{label:'j',value:'j'},{label:'k',value:'k'},{label:'m',value:'m'},{label:'p',value:'p'}]} /> to your block.
  2. See that you can't scroll list

Screenshots, screen recording, code snippet

Screenshot 2022-12-16 at 2 50 20 PM

Environment info

wordpress: version 6.1
gutenberg: core built-in version
theme: custom theme, but shouldn't matter

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended [Feature] Block settings menu The block settings screen labels Dec 19, 2022
@ndiego ndiego added the Needs Testing Needs further testing to be confirmed. label Dec 20, 2022
@ndiego
Copy link
Member

ndiego commented Dec 20, 2022

This issue was reviewed in today's Editor Bug Scrub. I spun up a quick demo using the code examples from the docs and was able to confirm. The resulting screenshot is below.

image

@ndiego ndiego added [Package] Components /packages/components and removed Needs Testing Needs further testing to be confirmed. [Feature] Block settings menu The block settings screen labels Dec 20, 2022
@mirka
Copy link
Member

mirka commented Dec 20, 2022

Thanks for the report!

This has been on our radar, so closing in favor of #27166

@mirka mirka closed this as completed Dec 20, 2022
@mirka mirka added this to Inbox (needs triage) 📬 in WordPress Components via automation Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
WordPress Components
Inbox (needs triage) 📬
Development

No branches or pull requests

4 participants