如何更改 Antd 表中的排序顺序?
我想更改ANTD表中的排序顺序。现在,在初始化组件之后,排序以“单击进行排序”开始,然后切换到下降,最后是无。
我的目标是从上升 - &gt更改订单;下降 - >无需降序 - >上升 - >无。如果没有将工具提示消息和请求变为反向的情况,是否有可能?
我已经尝试使用sortDirections
和defaultSortorder
,但它们似乎并没有解决我的问题。
I want to change the sorting order in Antd's table. Right now, just after the component is initialized, sorting starts with "Click to sort ascending", then switches to descending and finally to none.
My goal is to change the order from ascending -> descending -> none to descending -> ascending -> none. Is it possible without changing tooltip messages and requests to their reverse?
I've tried using sortDirections
and defaultSortOrder
but they don't seem to solve my problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看了ANTD文档 - 版本4.19.4-和
sortDirections
在我的情况下。这是一个沙盒: https://codesandbox.io/sandbox.io/santd-table-s/antd-table-- sorting-order-9Uuv80
我没有包含工具提示,但是您可以看到该顺序是 descing , apping and em> and none 。
I had a look at the antd docs - version 4.19.4 - and
sortDirections
works in my case.Here's a Sandbox: https://codesandbox.io/s/antd-table-sorting-order-9uuv80
I didn't include the tooltip but you can see the order is descending, ascending and none.