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

FluentCombobox within FluentCard

Open Rocky-25 opened this issue 3 years ago • 3 comments

🐛 Bug Report

When putting a FluentCombobox within a FluentCard, if the item list is more than the space in the card you can't see the options.

💻 Repro or Code Sample

<FluentCard Style="min-height:150px;padding:20px;width:25%;"> <FluentCombobox Items=Options OptionText="@(i => i.Description)" OptionValue=@(i => i.Id.ToString()) @bind-Value="MarriageStatus" Autocomplete="ComboboxAutocomplete.Both" Placeholder="Select status"> Marriage Status </FluentCombobox> </FluentCard>

@code {

private string MarriageStatus;

public IEnumerable<MarriageOption> Options { get; set; } = new List<MarriageOption>
        {
            new MarriageOption("Married"),
            new MarriageOption("Single"),
            new MarriageOption("Partner"),
            new MarriageOption("Common law"),
            new MarriageOption("Civil partnership"),
            new MarriageOption("Separated"),
            new MarriageOption("Divorced"),
            new MarriageOption("Widowed")
        };

}

🤔 Expected Behavior

Should be able to see the list in front of the card.

😯 Current Behavior

Can not see the full list. image

Rocky-25 avatar Oct 05 '23 11:10 Rocky-25

Hi, That's by design from the underlying fluent-card Web Component. You have to remove the content-visibility and contain styles like this.

<FluentCard Style="content-visibility: inherit; contain: inherit;">
   ...
</FluentCard>

@vnbaaij I suggest disabling these two styles by default in our FluentCard component. Or ask the FAST team to remove these two styles. What's your opinion?

dvoituron avatar Oct 06 '23 07:10 dvoituron

That's great, thank you. Did I miss this somewhere in the documentation about components in general or should the card page explain this? https://www.fluentui-blazor.net/Card

Rocky-25 avatar Oct 06 '23 08:10 Rocky-25

No. I did not found that before your question 😊 Reason why I propose to fix our FluentCard to avoid to do that manually, using styles.

dvoituron avatar Oct 06 '23 08:10 dvoituron