Skip to content

Commit eaab90e

Browse files
CopilotArgoZhang
authored andcommitted
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]>
1 parent 7051bf1 commit eaab90e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
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.2</Version>
4+
<Version>9.10.3</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Dialog/Dialog.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ private async Task Show(DialogOption option)
166166

167167
private static RenderFragment RenderDialog(int index, Dictionary<string, object> parameter) => builder =>
168168
{
169+
if (index > 0)
170+
{
171+
parameter[nameof(ModalDialog.IsScrolling)] = true;
172+
}
173+
169174
builder.OpenComponent<ModalDialog>(100 + index);
170175
builder.AddMultipleAttributes(101 + index, parameter);
171176
builder.SetKey(parameter);

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

Lines changed: 2 additions & 2 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;

0 commit comments

Comments
 (0)