问题描述
我正在为我的 React JS 项目使用核心 UI 管理。问题是,我想应用外部排序,但除了一列之外,我的列上没有显示箭头。我还在列中提供了字符串数据。 有什么方法可以在每个列标题上添加排序器图标并使其可点击以进行自定义排序。
<CDataTable
items={clientState.data}
fields={[
{ key: ' ',sorter: true,_style: { width: "1%" } },{ key: ‘clientName’,},{ key: 'createdBy',]}
hover
sorter={{ external: true }}
onSorterValueChange={(e) => {
var typeSort = e.asc ? "ASC" : "DESC"
alert(typeSort)
}}
striped
clickableRows
scopedSlots={{
' ':
(item,index) => (
<td>
<div className="has-center-v-middle">
<ImageminiItem imageURL={item.imageURL} />
</div>
</td>
),‘clientName':
(item,index) => (
<td>
{item.name}
</td>
),'createdBy':
(item,index) => (
<td>
{item.createdBy}
</td>
),)
}}
/>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)