i use primereact 1.4.0
the expander should not be visible in all rows.
the expander should only shown, if the value in the model is true.
Code: Select all
let data = [
{"rowvalue": true, ...},
{"rowvalue": false, ...}];
<DataTable value={this.props.data}
onRowToggle={(e) => this.setState({expandedRows:e.data})}
rowExpansionTemplate={(e) => this.rowExpansionTemplate(e)}
expandedRows={this.state.expandedRows}>
<Column expander={rowvalue} style={{width: '3em'}} />
<Column field="anyvalue" header="AColumn" />
</DataTable>
thanks,
aokieh