Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持默认升降序 #166

Open
chrsas opened this issue Dec 8, 2016 · 12 comments
Open

支持默认升降序 #166

chrsas opened this issue Dec 8, 2016 · 12 comments
Assignees

Comments

@chrsas
Copy link

chrsas commented Dec 8, 2016

目前排序的类型和搜索栏的内容无法有外界配置,没法和Redux配合。

@eternalsky
Copy link
Member

排序的类型,如果配置 fetchUrl 的情况下,可以在 beforeFetch 中进行处理。如果是不配置 fetchUrl,使用 jsxdata 的情况下,也提供了相应的 API,onSearch、onOrder 等等,你所指的无法配合是哪里?

@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

我想在不配置 fetchUrl的情况下,直接通过配置来设置列排序状态,而不是用户点击列标题时才触发。

@eternalsky
Copy link
Member

你是说设置 icon 的样式吗?因为排序状态,你完全也可以默认一种排序,现在排序的 icon,一直是按照默认,升序,降序的三个状态切换的。

@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

那么默认降序通过哪里配置?

@eternalsky
Copy link
Member

eternalsky commented Dec 8, 2016

我的意思是你的数据可以默认状态是一种排序。

@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

这个当然可以,但是我需要同时控制Table列的图标为这种状态,怎么弄呢?

@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

比如用户对某个列做了降序或者升序操作,切换到编辑页面对单挑数据经行了编辑,在切换回Table所在页面,这是Table重新Render,其排序状态如何从Redux的state恢复?

@eternalsky
Copy link
Member

目前的排序状态是非受控的,这个点是一个增强点。

@eternalsky eternalsky self-assigned this Dec 8, 2016
@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

搜索栏的内容现受控吗?

@eternalsky
Copy link
Member

可以支持受控

@chrsas
Copy link
Author

chrsas commented Dec 8, 2016

已经实现了吗?

@eternalsky
Copy link
Member

实现会 close issue

@eternalsky eternalsky changed the title 需要增加设置排序和搜索栏内容的方法 支持默认升降序 Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants