Skip to content

Value text overflow in Dropdown #3886

Open
@torablien

Description

@torablien

Filing a new issue per @ndonkoHenri in #3231 (comment)

Is there an option or configuration to address overflow of value text in a Dropdown?

Example:

image
import flet as ft


def main(page: ft.Page):
    text_style = ft.TextStyle(
        overflow=ft.TextOverflow.ELLIPSIS,
    )
    str_options = [
        "A really large option string that can take up a lot of space so it will likely overflow but it shouldn't go outside the dropdown area itself",
        "Option 2",
        "Option 3",
    ]
    options = [
        ft.dropdown.Option(str_option, text_style=text_style)
        for str_option in str_options
    ]
    dropdown = ft.Dropdown(options=options, value=str_options[0], text_style=text_style)
    container_with_border = ft.Container(
        content=dropdown, border=ft.border.all(1, "RED")
    )
    page.add(container_with_border)


ft.app(main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions