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 摘要。