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

[Bug Report] 刷新页面就异常,再刷新正常,再刷新异常 #2280

Closed
antonertabvoiser8416 opened this issue Dec 14, 2024 · 5 comments
Labels
status/invalid This doesn't seem right status/stale

Comments

@antonertabvoiser8416
Copy link

Masa.Blazor version

Masa.Blazor 1.8.0

Hosting model

Blazor Hybird(MAUI/WPF/WinForm)

Describe the bug

在官方案例中,如果出错Fixed = DataTableFixed.Right启动软件正常,但是刷新页面就异常,再刷新正常,再刷新异常...

Expected Behavior

Fixed = DataTableFixed.Right

Steps To Reproduce

No response

Reproduction code

@page "/test"
<MDataTable Headers="_headers"
            Items="_desserts"
            ItemsPerPage="5"
            Class="elevation-1"></MDataTable>

@code {
    public class Dessert
    {
        public string Name { get; set; }

        public int Calories { get; set; }

        public double Fat { get; set; }

        public int Carbs { get; set; }

        public double Protein { get; set; }

        public int Sodium { get; set; }

        public string Calcium { get; set; }

        public string Iron { get; set; }
    }

    private List<DataTableHeader<Dessert>> _headers = new List<DataTableHeader<Dessert>>
        {
           new ()
           {
            Text= "Dessert (100g serving)",
            Align= DataTableHeaderAlign.Start,
            Sortable= false,
            Value= nameof(Dessert.Name)
          },
          new (){ Text= "Calories", Value= nameof(Dessert.Calories)},
          new (){ Text= "Fat (g)", Value= nameof(Dessert.Fat)},
          new (){ Text= "Carbs (g)", Value= nameof(Dessert.Carbs)},
          new (){ Text= "Protein (g)", Value= nameof(Dessert.Protein)},
          new (){ Text= "Iron (%)", Value= nameof(Dessert.Iron) ,Fixed = DataTableFixed.Right}
        };

    private List<Dessert> _desserts = new List<Dessert>
        {
           new Dessert
           {
              Name= "Frozen Yogurt",
              Calories= 159,
              Fat= 6.0,
              Carbs= 24,
              Protein= 4.0,
              Iron= "1%",
            },
            new Dessert
            {
              Name= "Ice cream sandwich",
              Calories= 237,
              Fat= 9.0,
              Carbs= 37,
              Protein= 4.3,
              Iron= "1%",
            },
            new Dessert
            {
              Name= "Eclair",
              Calories= 262,
              Fat= 16.0,
              Carbs= 23,
              Protein= 6.0,
              Iron= "7%",
            },
            new Dessert
            {
              Name= "Cupcake",
              Calories= 305,
              Fat= 3.7,
              Carbs= 67,
              Protein= 4.3,
              Iron= "8%",
            },
            new Dessert
            {
                Name= "Gingerbread",
                Calories= 356,
                Fat= 16.0,
                Carbs= 49,
                Protein= 3.9,
                Iron= "16%"
            },
            new Dessert
            {
                Name= "Jelly bean",
                Calories= 375,
                Fat= 0.0,
                Carbs= 94,
                Protein= 0.0,
                Iron= "0%",
            },
            new Dessert
            {
                Name= "Lollipop",
                Calories= 392,
                Fat= 0.2,
                Carbs= 98,
                Protein= 0,
                Iron= "2%",
            },
            new Dessert
            {
                Name= "Honeycomb",
                Calories= 408,
                Fat= 3.2,
                Carbs= 87,
                Protein= 6.5,
                Iron= "45%",
            },
            new Dessert
            {
                Name= "Donut",
                Calories= 452,
                Fat= 25.0,
                Carbs= 51,
                Protein= 4.9,
                Iron= "22%",
            },
            new Dessert
            {
                Name= "KitKat",
                Calories= 518,
                Fat= 26.0,
                Carbs= 65,
                Protein= 7,
                Iron= "6%",
            }
        };
}

.NET version

No response

@antonertabvoiser8416 antonertabvoiser8416 added the type/bug Something isn't working label Dec 14, 2024
@antonertabvoiser8416
Copy link
Author

using Photino.Blazor;

@capdiem
Copy link
Contributor

capdiem commented Dec 14, 2024

@antonertabvoiser8416 什么异常?

@capdiem capdiem added status/invalid This doesn't seem right and removed type/bug Something isn't working labels Dec 16, 2024
@capdiem
Copy link
Contributor

capdiem commented Dec 16, 2024

@antonertabvoiser8416 你也许遇到的是这个问题 dotnet/aspnetcore#52119

@capdiem capdiem changed the title [Bug Report] [Bug Report] 刷新页面就异常,再刷新正常,再刷新异常 Dec 16, 2024
Copy link

This issue is stale because it has been open for 4 days with no activity.

Copy link

This issue is closed because it has been open for 3 days with stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid This doesn't seem right status/stale
Projects
None yet
Development

No branches or pull requests

2 participants