@@ -126,11 +126,11 @@ export class Transactions extends Component {
126126 getTransaction ( 'ChannelNotSpecified' , this . props . transactionId ) ;
127127 this . setState ( { directLinkSearchResultsFlag : true } ) ;
128128 }
129- const { transactionList } = this . props ;
129+ // const { transactionList } = this.props;
130130 const selection = { } ;
131- transactionList . forEach ( element => {
132- selection [ element . blocknum ] = false ;
133- } ) ;
131+ // transactionList.forEach(element => {
132+ // selection[element.blocknum] = false;
133+ // });
134134 const opts = [ ] ;
135135 this . props . transactionByOrg . forEach ( val => {
136136 opts . push ( { label : val . creator_msp_id , value : val . creator_msp_id } ) ;
@@ -139,22 +139,21 @@ export class Transactions extends Component {
139139 this . handleSearch ( ) ;
140140 }
141141
142- componentWillReceiveProps ( nextProps ) {
142+ componentDidUpdate ( prevProps , prevState ) {
143143 if (
144144 this . state . search &&
145- nextProps . currentChannel !== this . props . currentChannel
145+ this . props . currentChannel !== prevProps . currentChannel
146146 ) {
147147 if ( this . interval !== undefined ) {
148148 clearInterval ( this . interval ) ;
149149 }
150150 this . interval = setInterval ( ( ) => {
151- this . searchTransactionList ( nextProps . currentChannel ) ;
151+ this . searchTransactionList ( this . props . currentChannel ) ;
152152 } , 60000 ) ;
153- this . searchTransactionList ( nextProps . currentChannel ) ;
153+ this . searchTransactionList ( this . props . currentChannel ) ;
154154 }
155- }
156- componentDidUpdate ( prevProps , prevState ) {
157155 if ( prevState . page != this . state . page || prevState . rowsPerPage != this . state . rowsPerPage || this . state . searchClick ) {
156+ this . setState ( { searchClick : false } ) ;
158157 this . handleSearch ( ) ;
159158 }
160159 }
@@ -226,7 +225,7 @@ export class Transactions extends Component {
226225 this . searchTransactionList ( ) ;
227226 } , 60000 ) ;
228227 await this . searchTransactionList ( ) ;
229- this . setState ( { search : true , searchClick : false } ) ;
228+ this . setState ( { search : true } ) ;
230229 if ( this . props . transactionId ) {
231230 this . setState ( { directLinkSearchResultsFlag : false } ) ;
232231 const { getTransaction } = this . props ;
@@ -436,7 +435,7 @@ export class Transactions extends Component {
436435 className = { classes . searchButton }
437436 color = "success"
438437 disabled = { this . state . err || ( ! this . state . from != ! this . state . to ) }
439- onClick = { async ( ) => {
438+ onClick = { ( ) => {
440439 this . setState ( { page :0 , searchClick :true , queryFlag : true , defaultQuery : false } )
441440 } }
442441 >
0 commit comments