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

fix: [FluentDataGrid show no data in version 4.4.0?] in [where is the issue?] #1433

Closed
jobou363 opened this issue Feb 3, 2024 · 6 comments
Closed
Labels
needs: repro code or repository The provided description or code is insufficient to repro the issue

Comments

@jobou363
Copy link

jobou363 commented Feb 3, 2024

🐛 Bug Report

I use fluentui 4.3.1 and tried to upgrade to 4.4.0 but realize the FluentDataGrid doesn't show any data but in debug i see that the date is there.

💻 Repro or Code Sample

i use the GridItemsProvider method to bind the data

`
public GridItemsProvider GridItemsProvider = default!;

private async Task LoadPlans(int pageNumber)
{
if (User.Identity.IsAuthenticated)
{
GridItemsProvider = GetGridItemsProvider(pageNumber, User.RegimeEntityId());
}
}

private GridItemsProvider GetGridItemsProvider(int pageNumber, Guid regimeId)
{
return async req =>
{
var orderByProperties = req.GetSortByProperties().ToOrderByProperties();

    var query = new GetPlansBySearchTermQuery(regimeId, SearchInput.Term, orderByProperties, pageNumber, pageSize: 10);
    AllPlansResult result = await QueryDispatcher.DispatchAsync<GetPlansBySearchTermQuery, AllPlansResult>(query);

    MetaData = result.MetaData;

    StateHasChanged();

    return GridItemsProviderResult.From(
        items: result.Plans,
        totalItemCount: MetaData.TotalCount);
};

}
`

i use the following data grid
`

   <TemplateColumn Title="">
       <FluentButton Appearance="Appearance.Accent" Type="ButtonType.Button" OnClick="@(() => NavigateToWithParameter(TaskAction, context.PlanEntityId))">
           <span slot="start">
               <FluentIcon Icon="Icons.Regular.Size24.EyeLines" Color="Color.Info"/>
           </span>
           Description
       </FluentButton>
   </TemplateColumn>

   <PropertyColumn Title="@Localization.Abreviation" Property="@(p => p.Abbreviation)" Align="Align.Start" Sortable="true"/>
   <PropertyColumn Title="@Localization.Description" Property="@(p => p.Description)" Align="Align.Start" Sortable="true"/>
`

🤔 Expected Behavior

I should still see data for each item i have in my database.

😯 Current Behavior

The grid show the message "no data".

💁 Possible Solution

I have rollback for now to 4.3.1

🔦 Context

🌍 Your Environment

  • OS & Device: Window 11 64 bits, DELL XPS 15 2023 64 GO RAM
  • Browser : Google Chrome
  • .NET : 8.0.101 and FAST Version : 4.4.0

Visual studio 2022 17.8.4

@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 3, 2024

Please give us a repro sample we can run. Copy and paste your code is not going to reproduce the issue for us.
We have to much going on and frankly don't have the time to try to get every issue reproduced by ourselves.
(Temporary) Acces to a repo works as well.

@vnbaaij vnbaaij added the needs: repro code or repository The provided description or code is insufficient to repro the issue label Feb 3, 2024
@mr-olenoid
Copy link

Have the same problem. Managed to reproduce in Template application on Weather page.
await Task.Delay(50); in this case cause problem if commented table shows normally
https://github.com/mr-olenoid/SSR_test

Hope this helps

@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 3, 2024

@mr-olenoid I am not sure if you have the same issue. In your case it doesn't work because you have an error in your weather page

@page "/weather"
@attribute [StreamRendering]
@rendermode InteractiveServer

You can't have both @attribute and `@rendermode'

It also doesn't work with the delay and only @Attribute, so I'll keep digging

@mr-olenoid
Copy link

@vnbaaij My mistake, still leaving only @rendermode InteractiveServer data still did not appear.

@randy9527
Copy link

Experiencing the same, looks like introduced by #1422?
My personal feeling we should be careful on overriding ShouldRender. There's #1222 in fluentTabs and has to be reverted. Seems similar?

@majkada
Copy link

majkada commented Feb 5, 2024

I experience the same issue after updating from 4.3.1 to 4.4.0.

The paginator shows the correct number of items & pages. When I add an item the paginator updates correctly too but the table remains without shown items.

vnbaaij added a commit that referenced this issue Feb 5, 2024
@vnbaaij vnbaaij closed this as completed in 6d66226 Feb 6, 2024
vnbaaij added a commit that referenced this issue Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: repro code or repository The provided description or code is insufficient to repro the issue
Projects
None yet
Development

No branches or pull requests

5 participants