fix: RowSize ignored if MultiLine="true" in FluentDataGrid

オープン
#5,667 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
frontend

調査の方向性

Start by reading the FluentDataGrid implementation and its styles for the RowSize and MultiLine parameters, then look for existing data grid tests covering row sizing and multiline content. Reproduce the report with RowSize="DataGridRowSize.Large" and MultiLine="true"; done means rows retain the large size while multiline content is displayed without rows merging.

索引モデルが issue の本文から書いたものです。

説明

🐛 Bug Report

Greetings. I came across the following problem:
If you specify the MultiLine="true" parameter, the RowSize parameter is ignored.

💻 Repro or Code Sample

@page "/"

<PageTitle>Page</PageTitle>

<h3>Header</h3>

<div id="datagrid-container">
    <FluentDataGrid Items="@FilteredItems" Pagination="@pagination" Loading="data == null" GridTemplateColumns="0.6fr 1fr 1fr" RowSize="DataGridRowSize.Large" MultiLine="true">
        <ChildContent>
            <PropertyColumn Property="@(c => c.Id.ToString())" Title="Id" Sortable="true"/>
            <PropertyColumn Property="@(c => c.Text1)" Title="Text1" Sortable="true"/>
            <PropertyColumn Property="@(c => c.Text2)" Title="Text2" Sortable="true"/>
        </ChildContent>
        <LoadingContent>
            <p>Loading</p>
        </LoadingContent>
        <EmptyContent>
            <p>No data.</p>
        </EmptyContent>
    </FluentDataGrid>
</div>

<FluentPaginator State="@pagination">
    <SummaryTemplate>
        @($"Total {pagination.TotalItemCount ?? 0}")
    </SummaryTemplate>
    <PaginationTextTemplate>
        @($"{pagination.CurrentPageIndex + 1} / {pagination.LastPageIndex + 1 ?? 1}")
    </PaginationTextTemplate>
</FluentPaginator>

<style>
    #datagrid-container {
        height: calc(100% - 3.5rem);
        min-height: 8rem;
        max-height: 80dvh;
        overflow-x: auto;
        overflow-y: hidden;
    }
</style>

@code {
    public class ExampleData {
        public required int Id { get; set; }
        public required string Text1 { get; set; }
        public required string Text2 { get; set; }
    }

    private PaginationState pagination = new PaginationState { ItemsPerPage = 20 };
    private IQueryable<ExampleData>? FilteredItems => data?.AsQueryable();

    public List<ExampleData>? data = null;
    protected override void OnInitialized() {
        data = [];
        data.Add(new() {
            Id = 0,
            Text1 = "A",
            Text2 = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua."
            });

        for (int i = 1; i < 300; i++) {
            if (i >= 10 && i % 3 == 0) {
                data.Add(new() {
                    Id = i,
                    Text1 = "A",
                    Text2 = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua."
                });
            } else  {
                data.Add(new() {
                    Id = i,
                    Text1 = "A",
                    Text2 = "B"
                });
            }
        }
    }
}

🤔 Expected Behavior

It was expected that these parameters would not conflict with each other.

😯 Current Behavior

When the MultiLine="true" parameter is specified, the lines “merge” (see the screenshot).

image

💁 Possible Solution

🔦 Context

🌍 Your Environment

  • OS & Device: Windows 11
  • Browser Yandex Browser (Chrome Family)
  • .NET and Fluent UI Blazor library Version 10.0.404 and 5.1.0
主要言語
C#
スター
4.9k
フォーク
497
平均マージ
1日 1時間
マージ済み PR(30日)
47

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/fluentui-blazor のほかの issue

microsoft/fluentui-blazor の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。