Skip to content

feat(Table): update FitColumnWidthIncludeHeader default value to true#7962

Merged
ArgoZhang merged 1 commit intomainfrom
feat-table-fit
May 9, 2026
Merged

feat(Table): update FitColumnWidthIncludeHeader default value to true#7962
ArgoZhang merged 1 commit intomainfrom
feat-table-fit

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented May 9, 2026

Link issues

fixes #7961

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Enhancements:

  • Set the Table component's FitColumnWidthIncludeHeader parameter default to true and update its documentation comments accordingly.

Copilot AI review requested due to automatic review settings May 9, 2026 05:45
@bb-auto bb-auto Bot added the enhancement New feature or request label May 9, 2026
@bb-auto bb-auto Bot added this to the v10.6.0 milestone May 9, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 9, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Table component so that auto-fit column width calculations include the header row by default, adjusting only the parameter’s default value and its documentation comments.

Updated class diagram for Table FitColumnWidthIncludeHeader default

classDiagram
    class Table_TItem_ {
        +Func_string_int_Task_int_ OnAutoFitColumnWidthCallback
        +bool FitColumnWidthIncludeHeader = true
    }
Loading

File-Level Changes

Change Details Files
Change FitColumnWidthIncludeHeader parameter to default to true and update its documentation to match.
  • Update XML doc comments (Chinese and English) to state the default value is true instead of false.
  • Set the FitColumnWidthIncludeHeader parameter’s default value to true in its property declaration so that auto-fit behavior now includes the header row unless overridden.
src/BootstrapBlazor/Components/Table/Table.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7961 Update the Table component's FitColumnWidthIncludeHeader parameter so that its default value is true and the associated documentation/comments reflect this default.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit d42d62d into main May 9, 2026
5 of 6 checks passed
@ArgoZhang ArgoZhang deleted the feat-table-fit branch May 9, 2026 05:46
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Table<TItem> component’s column auto-fit behavior by changing the default of FitColumnWidthIncludeHeader to include header content when calculating column widths, aligning with the requested feature change in #7961.

Changes:

  • Changed FitColumnWidthIncludeHeader default value from false (implicit) to true (explicit initializer).
  • Updated the XML documentation to reflect the new default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1835 to +1840
/// <summary>
/// <para lang="zh">获得/设置 列宽自适应时是否包含表头 默认 false</para>
/// <para lang="en">Gets or sets Whether to include header when auto fit column width. Default false</para>
/// <para lang="zh">获得/设置 列宽自适应时是否包含表头 默认 true</para>
/// <para lang="en">Gets or sets Whether to include header when auto fit column width. Default true</para>
/// </summary>
[Parameter]
public bool FitColumnWidthIncludeHeader { get; set; }
public bool FitColumnWidthIncludeHeader { get; set; } = true;
Comment on lines 1839 to +1840
[Parameter]
public bool FitColumnWidthIncludeHeader { get; set; }
public bool FitColumnWidthIncludeHeader { get; set; } = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Table): update FitColumnWidthIncludeHeader default value to true

2 participants