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

ComboBox/ComboBoxItem overflow🐛 #478

Closed
khanliKU opened this issue Aug 18, 2022 · 0 comments · Fixed by #481
Closed

ComboBox/ComboBoxItem overflow🐛 #478

khanliKU opened this issue Aug 18, 2022 · 0 comments · Fixed by #481
Labels
bug Something isn't working

Comments

@khanliKU
Copy link

khanliKU commented Aug 18, 2022

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.

@bdlukaa bdlukaa added the bug Something isn't working label Aug 20, 2022
@bdlukaa bdlukaa linked a pull request Aug 20, 2022 that will close this issue
3 tasks
bdlukaa added a commit that referenced this issue Aug 21, 2022
- `ComboBox` updates:
  - **BREAKING** Renamed `Combobox` to `ComboBox`
  - Implement `EditableComboBox`, a combo box that accepts items that aren't listed ([#244](#244)) 
  - `ComboBox.isExpanded: false` now correctly sets the button width ([#382](#382))
  - `ComboBox`'s items height are correctly calculated, as well as initial scroll offset ([#472](#478))
  - **BREAKING** `ComboBox.disabledHint` was renamed to `ComboBox.disabledPlaceholder`
  - Added `ComboBoxFormField` and `EditableComboBoxFormField` ([#373](#373))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants