Remember solve their own computer to see online project encountered no problem, other colleagues computer to see the line item in question incurable diseases

Today I say to my colleagues back projects just on the line of input box function problems, to fill a whole column will change along with, and I do not have this problem here, so annoying, I feel not my problem, the result was colleague With the help and the help of other front-end big brother, I found that because of the different screening options before generating the table,

 

 

So there are some problems, some no problem, because the problem is not the browser, after finding the problem, I troubleshoot the error variables (background here, thanks to the help of students, early screenshots have to give me)

 

 This variable is the students back to me, why we will complain it? Read the code only think of it in order to distinguish a row, and a page (table have paging functionality), I give variable before the variable plus a variable index reason for this variable undefines is this.trIndex1 is undefined, I traced and found that the only variable is defined in the componentWillReceiveProps, but not defined in componentWillMount in, so sometimes get less, it is as if the probability of an event, sometimes right, sometimes it is not, so, in fact, and filters it does not matter , purely a matter of luck, I defined after this.trIndex, the problem is solved in componentWillMount in the background there was good, too, and then what is the problem, then it slowly investigation.

 

 

  The things taught me two reasons: 1 has encountered a problem not panic, even if that very difficult, there is no way to start, we must maintain state of mind, listen to the advice of others, do not always feel that people say do not fly , listen, think, try, do not worry. 2. Write the code to develop good habits, we must declare what global variables before the assembly mount, so again this is a problem.

 

Guess you like

Origin www.cnblogs.com/douzizuikeai/p/11585173.html