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的 data 数据 _checked 以及 _disbaled 参数的建议 #314

Closed
loongMa opened this issue Aug 19, 2019 · 1 comment
Closed
Assignees

Comments

@loongMa
Copy link

loongMa commented Aug 19, 2019

希望Table 可以增加 一个API,接受一个返回包含 _checked 和 _disabled参数的object 的方法
比如
getDataSelections={(record) => {
return {
_checked: record.checked,
_disabled: record.disabled
}
}}
table内部在进行数据遍历的时候,将使用此方法获取的对象来进行选中,禁用等设置,
这样就不需要用户现在外面遍历一遍数据,设置_checked,_disabled,传入table,然后table再进行遍历

@HuaYJ1996 HuaYJ1996 self-assigned this Aug 29, 2019
@yangchch6 yangchch6 assigned yangchch6 and unassigned HuaYJ1996 Sep 26, 2019
@yangchch6
Copy link
Contributor

yangchch6 commented Oct 19, 2019

  • bee-table@2.2.14
    • [Update]优化多选表格data更新处理逻辑。

具体使用如下:

/**
   *@param selectedList:当前选中的行数据
   *@param record 当前操作行数据
   *@param index 当前操作行索引
   *@param newData 进行多选操作之后的新数据 data
   */
  getSelectedDataFunc = (selectedList,record,index,newData) => {
    console.log("selectedList", selectedList,"index",index);
    // 注意:需要用回调中提供的参数 newData,去更新 state 或 store 中的 data 属性值,否则当表格重新render的时候,已选数据会被冲刷掉。
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants