AllenFang / AllenFang/react-bootstrap-table

onRowSelect and onRowClick should be properties

未关闭
#439 3 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
JavaScript
星标
2.2k
派生
761
PR 合并指标
30 天内没有已合并 PR

描述

Currently, onRowClick and onRowSelect are set within an object, meaning that the functions set to them have to be global, or defined then and there. Because of this, the state of the component can't be changed, which restricts a lot of react functionality.

If onRowSelect and onRowClick were set as properties themselves, instead of as properties of properties:

``

it would remove the need for a global and allow access to the rest of the component.

The other option would be if selectRow or options could take functions that returned objects then they could be defined like:

```
options: function() {
return { onRowClick: this.rowClick };
}
```

and the same functionality is added.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。