Skip to content

maxHeight property on Select Component is wrongly documented #247

@vaevictis

Description

@vaevictis

Expectations

Following (this documentation)[https://garden.zendesk.com/react-components/select] I expected to be able to use maxHeight in one of these ways:
<Select maxHeight={'250'} /> or <Select maxHeight={250} />
Doc says:

One of type: string, number

Reality

These syntaxes get ignored by the component. The only one that works is <Select maxHeight={'250px'} />.

Steps to Reproduce

  1. Try to implement one of the broken syntaxes
  2. Witness that nothing happens
  3. Use the other syntax
  4. Admire that it works just fine

Implementation ideas:

  • Fix Doc
    or
  • Add a conversion layer somewhere that ensures the prop value is formatted in a way that's HTML/CSS compliant.
Fine Print
  • Component: Select
  • Browsers: Chrome (I suspect all)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions