AllenFang / AllenFang/react-bootstrap-table

onRowSelect and onRowClick should be properties

オープン
#439 コメント 3 件 リアクション 5 件 担当者 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 を短くまとめたダイジェスト。