Skip to content

Commit c280afb

Browse files
committed
Merge pull request #62 from Daxten/feature/RTProps
ReactTable, route new data from props to state
2 parents 77bf3c4 + be36e45 commit c280afb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/scala/chandu0101/scalajs/react/components/ReactTable.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ object ReactTable {
252252
val component = ReactComponentB[Props]("ReactTable")
253253
.initialState_P(p => State(filterText = "", offset = 0, p.rowsPerPage, p.data, Map()))
254254
.renderBackend[Backend]
255+
.componentWillReceiveProps(e => Callback.ifTrue(e.$.props.data != e.nextProps.data, e.$.backend.onTextChange(e.nextProps)(e.$.state.filterText)))
255256
.build
256257

257258
case class Props(data: Vector[Model],

0 commit comments

Comments
 (0)