geist-org / geist-ui

A design system for building modern websites and applications.

Home Page:https://geist-ui.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select Width Issue

ayushsharma82 opened this issue Β· comments

Bug report 🐞

Version & Environment

  • Version of browser - Safari - Latest
  • Version of geist-ui/core

Expected Behaviour

The width should be enforced when set through width property, but the component doesn't respect the value. ( i.e it doesn't decrease its width after achieving a certain minimum width ).

Actual results (or Errors)

The width can only be increased but stops decreasing after a certain minimum width.

image

Snippet for reproducing the error:

const [Limit, setLimit] = useState("10");

<Select placeholder="Show" value={Limit} onChange={(v) => setLimit(v)} scale={0.5} width={10}>
       <Select.Option value="10">10</Select.Option>
       <Select.Option value="25">25</Select.Option>
       <Select.Option value="50">50</Select.Option>
       <Select.Option value="75">75</Select.Option>
       <Select.Option value="100">100</Select.Option>
</Select>

I don't think this is a bug, but I think it's unnessecsary to have a minimum with for Select component, I'd like to fix it if it's OK. @unix