Skip to content

ComboBox/ComboBoxItem overflow🐛  #478

@khanliKU

Description

@khanliKU

Describe the bug
Item size is not automatically increased. Multiline Text widget overflows.

To Reproduce

showDialog(
  context: context,
  builder: (context) {
    String longString = List.generate(100, (index) => 'a').reduce((value, element) => value + element);
    List<String> oldConfigs = [longString,longString];
    String? programToLoad =
        Provider.of<AppState>(context, listen: false).selectedConfigName;
    return StatefulBuilder(
      builder: (context, setDialogState) => ContentDialog(
        content: ComboBox<String>(
          items: oldConfigs.map((e) => ComboBoxItem(child: Text(e), value: e)).toList(),
          onChanged: (String? value) => setDialogState(() => programToLoad = value),
          value: programToLoad,
          isExpanded: true,
        ),
      ),
    );
  }
);

Expected behavior
I expect the item height should adapt its contents.

Screenshots
Fluent UI ComboBox
image

Material Dropdown Button
image

Additional context
Material dropdown button doesn't throw an overflow error but it also doesn't resize the ComboBox accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions