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

Add title attribute to <Select> options #1922

Open
Sharzon opened this issue Oct 28, 2024 · 3 comments
Open

Add title attribute to <Select> options #1922

Sharzon opened this issue Oct 28, 2024 · 3 comments
Labels
component: Select enhancement New feature or request

Comments

@Sharzon
Copy link

Sharzon commented Oct 28, 2024

In some cases, we have very long options in the Select popup. In these cases, they are cropped with ellipses, so users cannot see the full text of the option. We can solve this by adding a title attribute to the options. We already have a title property in the ControlGroupOption type, so this approach is natural.
https://github.com/gravity-ui/uikit/blob/main/src/components/types.ts#L45

@korvin89
Copy link
Contributor

@ValeraS I suppose we should take this into account in the next major

@korvin89 korvin89 added this to the V7 milestone Oct 28, 2024
@ValeraS
Copy link
Contributor

ValeraS commented Oct 28, 2024

You can do it now like this:

<Select {...selectProps}>
    <Select.Option {...optionProps}>
        <span title="very long value">very long value</span>
    </Select.Option>
</Select>

@amje
Copy link
Contributor

amje commented Dec 3, 2024

@korvin89 Seems like its easy to add for option and for group, like we did in RadioGroup

@amje amje removed this from the V7 milestone Dec 3, 2024
@amje amje added the enhancement New feature or request label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Select enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants