AllenFang / AllenFang/react-bootstrap-table

When only one TableHeaderColumn in table export fails

Aperta
#1,914 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
2.2k
Fork
761
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

On version 4.3.1 the export function in BootstrapTable.js is as follows: `this.props.children.filter(_` => _ != null).map(function(column)`

Unfortunately `this.props.children` is only an array when there are more than one column configured. When there is only one it is no longer an array, but instead it is an object. I think that since the property is called `children`, which implies an array more than one item, it should be an array with only one item when there is only one column. I'm not sure if this `children` is being supplied by react so it may need to be fixed with a `if` check instead.

Here is a link to the current code in github: https://github.com/AllenFang/react-bootstrap-table/blob/26d07defab759e4f9bce22d1d568690830b8d9d7/src/BootstrapTable.js#L1174

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.