DataTable -> Column -> expander
Posted: 10 Jan 2018, 17:33
hi,
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.
can anybody help my?
thanks,
aokieh
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