Lobos / react-ui

A collection of components for React, base on bootstrap 4.0.
http://lobos.github.io/react-ui/
MIT License
1.63k stars 302 forks source link

React-ui Table #91

Closed sincsc closed 7 years ago

sincsc commented 7 years ago

Hello,how can I add or delete a row dynamically use Table with version 0.6,thanks very much!

Lobos commented 7 years ago

use an array as data, then add or remove item from the array.

this.state = { data: [...] }
...
<Table data={this.state.data} />
addRow (row) { this.setState({ data: this.state.data.push(row) }) }