Skip to content

Table属性Sortable等于true引发Width失效,设置Template后TextEllipsis与ShowTips失效 #4070

Answered by ArgoZhang
HongFei-Ye asked this question in Q&A
Discussion options

You must be logged in to vote

@HongFei-Ye 设置 Template 后很多功能基本都要自己写,因为组件无法知道模板的 DOM 结构很多样式或者功能无法做了,所以更改如下即可

<TableColumn @bind-Field="@context.AllThreadIds" Text="所有线程ID">
    <Template Context="value">
        @{
            var v = JsonSerializer.Serialize(value.Value);
        }
        <Tooltip Title="@v">
            <div style="overflow: hidden; text-overflow: ellipsis">@v</div>
        </Tooltip>
    </Template>
</TableColumn>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ArgoZhang
Comment options

Answer selected by HongFei-Ye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #4067 on August 15, 2024 07:46.