React js onClick can't pass value to method

后端 未结 30 2119
北荒
北荒 2020-11-22 07:05

I want to read the onClick event value properties. But when I click on it, I see something like this on the console:

SyntheticMouseEvent {dispatchConfig: Ob         


        
30条回答
  •  情深已故
    2020-11-22 07:40

    You can use your code like this:

     that.handleSort(e, column)} >{column}
    

    Here e is for event object, if you want to use event methods like preventDefault() in your handle function or want to get target value or name like e.target.name.

提交回复
热议问题