choppaluv / HighTravel

0 stars 0 forks source link

Money page implementation #25

Closed ghost closed 6 years ago

ghost commented 6 years ago

Basic component design with react-data-grid

2018-05-23 4 45 49

2018-05-23 4 50 09

choppaluv commented 6 years ago

Saga in Money Page - GET, POST

ghost commented 6 years ago

Add buttons

2018-05-26 2 23 35

2018-05-26 2 24 58

ghost commented 6 years ago

Delete, Modify functions added

2018-05-27 6 33 58

2018-05-27 6 34 23

choppaluv commented 6 years ago

Saga in Money Page - PATCH, DELETE

patch

delete

ghost commented 6 years ago

Problem with component rendering update

componentWillReceiveProps(nextProps) {
    console.log('####################componentWillReceiveProps', this.props,nextProps);
    if (nextProps.updated){
      var row = this.createRows(nextProps.budget.length,nextProps.budget)
      this.setState({selectedIndexes : [], rows:row[0], total: row[1]})
    }
  }

  shouldComponentUpdate(nextProps, nextState) {
      console.log("#########shouldCOmponent",this.props, nextProps, this.state,nextState)
      return (nextProps.updated ) || (this.props!==nextProps) || (this.state!==nextState)
  }