Skip to content

Implement better way of showing long values for drop downs #2761

@ddorosz

Description

@ddorosz
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

When using the Ant Design Select component, if you have long values, the dropdown expands to fit the values.

To ellipsis the long value, users have to write their own functionality for this but this results in the value looking like this:

Really long val...

Allow users to specify a max character length on dropdown components (Like for the Select component).

If a value exceeds the max character length, we use an ellipsis and on hover show a popup over the value that displays the entire value.

What does the proposed API look like?

When using the a-select component, we can have a property of maxDropdownChars. By default we have no max value length and the component functions the same way it does now.

<a-select
maxDropdownChars="20"
>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions