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

Table组件的change事件增加触发该事件的类型 #612

Open
1 task done
lxiaosky opened this issue Mar 20, 2019 · 5 comments
Open
1 task done

Table组件的change事件增加触发该事件的类型 #612

lxiaosky opened this issue Mar 20, 2019 · 5 comments

Comments

@lxiaosky
Copy link

lxiaosky commented Mar 20, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

目前这个事件在分页、排序、筛选变化时都触发返回相同的回调参数,不太好区分是由哪个触发的,比如我要区分是分页还是排序,我现在的处理方式是在回调里判断返回的current和我之前的current是否一样,如果是一样的说明是排序触发的~
能否将这三个(分页、排序、筛选)事件分开,或者在现在的回调里增加一个类型

What does the proposed API look like?

Chrome最新版
Vue最新版
Ant vue 最新版

@dupingwei
Copy link

我当前的解决方案是:关闭table 的pagination,额外的使用pagination组件

@MechaGirls
Copy link

MechaGirls commented Mar 21, 2020

对啊,table这个change事件的定位有点模糊。不够直观

@zguiyang
Copy link

zguiyang commented Jan 5, 2021

我也遇到了这个问题,这个change方法的设计真是令人头大

@myid9527
Copy link

同遇到问题,两年前的问题,现在还没解决,看到隔壁react在回调函数里添加了action属性判断是否是排序分页和过滤,唉~

@shizhihuaxu
Copy link

change事件目前增加了一个 extra 字段,包含 action可以获取到触发的是排序 or 分页等 ,不过目前table API 部分没有说明,我是在多列排序的 demo 中发现的。

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

7 participants