Skip to content

fix: Unexpected Behavior in FluentGrid #1517

@jbam-cgy

Description

@jbam-cgy

🐛 Bug Report

I'm getting unexpected results using FluentGrid:

  1. Code executes differently when wrapped in a FluentGrid?
  2. I'm getting two scroll bars in the default project when the content exceeds the available space.

💻 Repro or Code Sample

<!-- Part 1: Unexpected results 
     1. Shows Line 101 a hundred times
     2. On default project causes a second scroll bar to appear when run in isolation. If run
     in conjunction with Part 2 this goes away? 
-->
<FluentGrid>
    @for (int i = 1; i <= 100; i++)
    {              
        <FluentGridItem xs="12">Line @i</FluentGridItem>
    }
</FluentGrid>

<!-- Part 2: Gives expected results
     1. Shows Line 1 thru Line 100
     2. On default project doesn't causes a second scroll bar to appear when run in isolation.
-->
@* @for(int i = 1; i<= 100; i++)
{   
    <label>Line @i</label>
    <br/>
} *@

🤔 Expected Behavior

  1. Code to run the same in FluentGrid as it does outside of FluentGrid.
  2. No double scrollbars.

😯 Current Behavior

  1. Value is showing the last value when rendered to the screen.
  2. Two scrollbars are being created.

🔦 Context

Trying to dynamically add controls and getting undesirable results.

🌍 Your Environment

  • Windows 10 Enterprise
  • Chrome and Edge
  • .Net 8.0, Microsoft.FluentUI.AspNetCore.Components 4.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions