Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Doomce opened this issue Oct 3, 2024 · 2 comments · Fixed by #3853
Closed

Comments

@Doomce
Copy link

Doomce commented Oct 3, 2024

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

@macci001
Copy link
Contributor

macci001 commented Oct 7, 2024

Looking on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants