AllenFang / AllenFang/react-bootstrap-table

onRowSelect and onRowClick should be properties

Abierto
#439 3 comentarios 5 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
JavaScript
Estrellas
2.2k
Forks
761
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.