geist-ui icon indicating copy to clipboard operation
geist-ui copied to clipboard

Select Width Issue

Open ayushsharma82 opened this issue 2 years ago • 2 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

ayushsharma82 avatar Jun 14 '22 12:06 ayushsharma82

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>

ayushsharma82 avatar Jun 14 '22 12:06 ayushsharma82

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

jellli avatar Nov 01 '22 09:11 jellli