fix(Table): do not trigger sort when click copy column icon (#4120)

* fix: 防止拷贝触发排序

* doc: 更新示例

* chore: bump version 8.8.4-beta04
This commit is contained in:
Argo Zhang 2024-08-22 17:15:25 +08:00 committed by GitHub
parent f40679b00b
commit e207c5bd64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -90,7 +90,7 @@
OnQueryAsync="@OnQueryAsync">
<TableColumns>
<TableColumn @bind-Field="@context.DateTime" Width="120" FormatString="yyyy-MM-dd" ShowCopyColumn="true" />
<TableColumn @bind-Field="@context.Name" Width="100" ShowCopyColumn="true" />
<TableColumn @bind-Field="@context.Name" Width="100" ShowCopyColumn="true" Sortable="true" />
<TableColumn @bind-Field="@context.Address" ShowCopyColumn="true" />
<TableColumn @bind-Field="@context.Count" ShowCopyColumn="true" />
<TableColumn @bind-Field="@context.Education" ShowCopyColumn="true" />

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>8.8.4-beta03</Version>
<Version>8.8.4-beta04</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -720,6 +720,7 @@ const setCopyColumn = table => {
const el = table.el
EventHandler.on(el, 'click', '.col-copy', e => {
e.stopPropagation();
const index = e.delegateTarget.closest('th').cellIndex
let rows
if (table.thead) {