fluentui-blazor icon indicating copy to clipboard operation
fluentui-blazor copied to clipboard

feat: make Autocomplete set its height automatically

Open aco-mreble opened this issue 1 year ago • 4 comments

🙋 Feature Request

I would like to see the Autocomplete component set its height dependend on the selected items automatically.

🤔 Expected Behavior

Like in outlook.com: image

😯 Current Behavior

The items are only shown horizontally and overflow if too many items where selected image

💁 Possible Solution

Use a text-area instead and do the rest with flexbox magic

aco-mreble avatar Jan 11 '24 12:01 aco-mreble

It could be interesting. Let's see what can be done

In the meantime, you can add a style overflow: auto; to display a scrollbar. It's not the same result, but it may help you out.

image

By the way, I see that there's a bug in the component that should display left/right arrows at the extremes of the Textfield, when there are more elements than space.

dvoituron avatar Jan 12 '24 08:01 dvoituron

I think setting height automatically would not be the desired in all cases, may be a flag to indicate if auto-height is enabled or not. Display flipper (left/right arrow) if auto-height is disabled.

ra-one avatar Jan 14 '24 17:01 ra-one

@dvoituron can you please link the bug you mentioned in component, for tracking purpose. With workaround of overflow: auto; the scrollbar does appear but since i have fixed height and width autocomplete box, the selected items still overflow the box.

image

ra-one avatar Jan 20 '24 18:01 ra-one

I haven't created any new bugs. I've updated to milestone to 4.4.

dvoituron avatar Jan 22 '24 08:01 dvoituron

See #2045

dvoituron avatar May 14 '24 11:05 dvoituron