AllenFang / AllenFang/react-bootstrap-table

onRowSelect and onRowClick should be properties

Đang mở
#439 3 bình luận 5 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
2.2k
Fork
761
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.