Skip to content

Commit 06c5b30

Browse files
ljmay168CopilotArgoZhang
authored
fix(Table): filter out .is-detail rows when auto-fitting column widths (#6800)
* fix(Table): 双击表头自动调整列宽功能在表格有明细行时不能正常工作 #6797 * Initial plan * Implemented fix for multiple dialog scrolling issue Co-authored-by: ArgoZhang <[email protected]> * fix: 多级弹窗窗体内滚动 * Revert "Implemented fix for multiple dialog scrolling issue" This reverts commit 42c4136. * chore: bump version 9.10.3 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: ArgoZhang <[email protected]> Co-authored-by: Argo Zhang <[email protected]> * chore: bump version 9.11.0-beta01 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: ArgoZhang <[email protected]> Co-authored-by: Argo Zhang <[email protected]>
1 parent 3d09b91 commit 06c5b30

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.10.3</Version>
4+
<Version>9.11.0-beta01</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Table/Table.razor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,10 @@ const autoFitColumnWidth = async (table, col) => {
715715
const index = indexOfCol(col);
716716
let rows = null;
717717
if (table.thead) {
718-
rows = table.body.querySelectorAll('table > tbody > tr');
718+
rows = table.body.querySelectorAll('table > tbody > tr:not(.is-detail)');
719719
}
720720
else {
721-
rows = table.tables[0].querySelectorAll('table > tbody > tr');
721+
rows = table.tables[0].querySelectorAll('table > tbody > tr:not(.is-detail)');
722722
}
723723

724724
let maxWidth = 0;
@@ -811,10 +811,10 @@ const setCopyColumn = table => {
811811
rows = table.body.querySelectorAll('table > tbody > tr')
812812
}
813813
else if (el.querySelector('.table-fixed-column')) {
814-
rows = el.querySelectorAll('.table-scroll > .overflow-auto > table > tbody > tr')
814+
rows = el.querySelectorAll('.table-scroll > .overflow-auto > table > tbody > tr:not(.is-detail)')
815815
}
816816
else {
817-
rows = el.querySelectorAll('.table-scroll > table > tbody > tr')
817+
rows = el.querySelectorAll('.table-scroll > table > tbody > tr:not(.is-detail)')
818818
}
819819

820820
let content = ''

0 commit comments

Comments
 (0)