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

refactor(module: table): reorganize the selection of rows #3502

Merged
merged 19 commits into from
Nov 16, 2023

Conversation

ElderJames
Copy link
Member

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ 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
  • Changelog is provided or not needed

Copy link

github-actions bot commented Nov 8, 2023

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Attention: 118 lines in your changes are missing coverage. Please review.

Comparison is base (2b53e61) 1.55% compared to head (e434361) 44.69%.
Report is 2 commits behind head on master.

Files Patch % Lines
components/table/Table.razor.RowData.cs 0.00% 41 Missing ⚠️
components/table/Table.razor.Selection.cs 0.00% 27 Missing ⚠️
components/table/Table.razor 0.00% 25 Missing ⚠️
components/table/TableModels/RowData.cs 0.00% 13 Missing ⚠️
components/table/Table.razor.cs 0.00% 5 Missing ⚠️
components/select/Select.razor.cs 20.00% 3 Missing and 1 partial ⚠️
components/table/Selection.razor.cs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3502       +/-   ##
===========================================
+ Coverage    1.55%   44.69%   +43.14%     
===========================================
  Files         566      566               
  Lines       26899    26957       +58     
  Branches     5566     5587       +21     
===========================================
+ Hits          417    12049    +11632     
+ Misses      26442    13929    -12513     
- Partials       40      979      +939     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ElderJames ElderJames merged commit dbb1978 into master Nov 16, 2023
6 checks passed
@ElderJames ElderJames deleted the refactor/table-selection branch November 16, 2023 05:05
@Fredrik-C
Copy link

I noticed that a breaking change was introduced since in property/parameter RowSelectable was removed from components/table/Table.razor.cs?

Is there any way to achive the same functionality?

@jonaswikstrom
Copy link

RowSelectable just removed? Suddenly breaking changes?

@ElderJames
Copy link
Member Author

ElderJames commented Nov 22, 2023

I'm sorry @Fredrik-C ,@jonaswikstrom, this is because the RowSelectable duplicated the function of Selection .Disabled and did not use the disabled style, so it was removed. Please feel free to give us feedback if you have any suggestions.

You can set the disabled parameter to achieve the same functionality.

    <Table @ref="table" DataSource="@data" @bind-SelectedRows="selectedRows" RowKey="x=>x.Name">
+        <Selection Key="@context.Name" Type="@selectionType" Disabled="@(context.Name == "Disabled User")" />
        <PropertyColumn Property="c=>c.Name">
            <a>@context.Name</a>
        </PropertyColumn>
        <PropertyColumn Property="c=>c.Age" />
        <PropertyColumn Property="c=>c.Address" />
    </Table>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment