@@ -126,11 +126,11 @@ export class Transactions extends Component {
126
126
getTransaction ( 'ChannelNotSpecified' , this . props . transactionId ) ;
127
127
this . setState ( { directLinkSearchResultsFlag : true } ) ;
128
128
}
129
- const { transactionList } = this . props ;
129
+ // const { transactionList } = this.props;
130
130
const selection = { } ;
131
- transactionList . forEach ( element => {
132
- selection [ element . blocknum ] = false ;
133
- } ) ;
131
+ // transactionList.forEach(element => {
132
+ // selection[element.blocknum] = false;
133
+ // });
134
134
const opts = [ ] ;
135
135
this . props . transactionByOrg . forEach ( val => {
136
136
opts . push ( { label : val . creator_msp_id , value : val . creator_msp_id } ) ;
@@ -139,22 +139,21 @@ export class Transactions extends Component {
139
139
this . handleSearch ( ) ;
140
140
}
141
141
142
- componentWillReceiveProps ( nextProps ) {
142
+ componentDidUpdate ( prevProps , prevState ) {
143
143
if (
144
144
this . state . search &&
145
- nextProps . currentChannel !== this . props . currentChannel
145
+ this . props . currentChannel !== prevProps . currentChannel
146
146
) {
147
147
if ( this . interval !== undefined ) {
148
148
clearInterval ( this . interval ) ;
149
149
}
150
150
this . interval = setInterval ( ( ) => {
151
- this . searchTransactionList ( nextProps . currentChannel ) ;
151
+ this . searchTransactionList ( this . props . currentChannel ) ;
152
152
} , 60000 ) ;
153
- this . searchTransactionList ( nextProps . currentChannel ) ;
153
+ this . searchTransactionList ( this . props . currentChannel ) ;
154
154
}
155
- }
156
- componentDidUpdate ( prevProps , prevState ) {
157
155
if ( prevState . page != this . state . page || prevState . rowsPerPage != this . state . rowsPerPage || this . state . searchClick ) {
156
+ this . setState ( { searchClick : false } ) ;
158
157
this . handleSearch ( ) ;
159
158
}
160
159
}
@@ -226,7 +225,7 @@ export class Transactions extends Component {
226
225
this . searchTransactionList ( ) ;
227
226
} , 60000 ) ;
228
227
await this . searchTransactionList ( ) ;
229
- this . setState ( { search : true , searchClick : false } ) ;
228
+ this . setState ( { search : true } ) ;
230
229
if ( this . props . transactionId ) {
231
230
this . setState ( { directLinkSearchResultsFlag : false } ) ;
232
231
const { getTransaction } = this . props ;
@@ -436,7 +435,7 @@ export class Transactions extends Component {
436
435
className = { classes . searchButton }
437
436
color = "success"
438
437
disabled = { this . state . err || ( ! this . state . from != ! this . state . to ) }
439
- onClick = { async ( ) => {
438
+ onClick = { ( ) => {
440
439
this . setState ( { page :0 , searchClick :true , queryFlag : true , defaultQuery : false } )
441
440
} }
442
441
>
0 commit comments