nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.6k stars 1.41k forks source link

[BUG] - Label placement - "outside" conflicts with Multiline property in Select element #3841

Open Doomce opened 2 hours ago

Doomce commented 2 hours ago

NextUI Version

2.4.8

Describe the bug

Label position in Select element depends on properties: labelPlacement="outside" and isMultiline={true}. With isMultiline={true}, the label is displayed inside select border.

Code:

<Select
    labelPlacement={"outside"}
    label="User Properties"
    placeholder="Select properties"
    className="w-full"
    variant="bordered"
    selectedKeys={selection}
    items={properties}
    isMultiline={true}
>
    {properties.map((prop) => (
        <SelectItem key={prop} value={prop}>
            {prop}
        </SelectItem>
    ))}
</Select>

Visualization: {A192378E-3109-424F-946D-5DAFA995D999}

Other way - without multiline Code:

<Select
    labelPlacement={"outside"}
    label="User Properties"
    placeholder="Select properties"
    className="w-full"
    variant="bordered"
    selectedKeys={selection}
    items={properties}
    isMultiline={false}
>
    {properties.map((prop) => (
        <SelectItem key={prop} value={prop}>
            {prop}
        </SelectItem>
    ))}
</Select>

{4CD0C7F0-1E86-450D-8DB0-471937B00975}

Also, This issue can be found in NextUI documentation: {93606098-AA3E-4F3D-8BA7-0DBFCA4ABA19}

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Import Select, SelectItem components.
  2. Create Select element
  3. Set labelPlacement="outside" property to the item.
  4. Set isMultiline={true} property to the item.

Expected behavior

Label placement should not depend by isMultiline value (the label should be outside)

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

linear[bot] commented 2 hours ago

ENG-1427 [BUG] - Label placement - "outside" conflicts with Multiline property in Select element