WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.39k stars 4.15k forks source link

Down arrow should not be rendered on SelectControl when multiple = false #28818

Closed JohnRDOrazio closed 3 years ago

JohnRDOrazio commented 3 years ago

Description

A down arrow / chevron is rendered on all SelectControl components, whether or not the multiple property / attribute is set to true. It should not be needed when multiple:true because there is no dropdown in this case.

Step-by-step reproduction instructions

Create a SelectControl component, and set the multiple property to true.

Expected behaviour

No down arrow should be rendered.

Actual behaviour

A down arrow is rendered.

Screenshots or screen recording (optional)

Code snippet (optional)

WordPress information

Device information

I created PR #28817 to fix this. (not tested, needs review and testing)

talldan commented 3 years ago

This is easy to reproduce in the storybook - https://wordpress.github.io/gutenberg/?path=/story/components-selectcontrol--default.

talldan commented 3 years ago

I see this is already tracked in https://github.com/WordPress/gutenberg/issues/27166, so will consolidate the issues by closing this as a duplicate.