bdlukaa / fluent_ui

Implements Microsoft's WinUI3 in Flutter.

Home Page:https://bdlukaa.github.io/fluent_ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Weird effect when a ComboBox is inside a SizedBox

WinXaito opened this issue Β· comments

Describe the bug
Put a ComboBox in a SizedBox, the content is based on the bigger element inside, instead of the real size of the combobox.

image

Can you provide a reproducible snippet?

          SizedBox(
            width: 200,
            child: ComboBox(
              value: 1,
              items: const [
                ComboBoxItem(
                  value: 1,
                  child: Text('Val 1'),
                ),
                ComboBoxItem(
                  value: 2,
                  child: Text('Val 2'),
                ),
              ],
              onChanged: null,
            ),
          ),

Give this:

image

I would expect to have Val 1 on the left, and the chevron at the right.

Is it okay with that or you need a full reproductible project ?

Edit:

And if instead of 'Val 2' I put 'Val 2 long value', I got this when Val 1 is selected:
image
And that looks really weird.