Getting the value in the React material-UI Autocomplete

后端 未结 1 1183
北荒
北荒 2021-01-03 20:23

I am referring to the documentation of React Material-UI (https://material-ui.com/components/autocomplete/).

In the demo code,

    

        
1条回答
  •  遥遥无期
    2021-01-03 20:35

    Solved by using passing in the (event, value) to the onChange props.

     console.log(value)} // prints the selected value
        renderInput={params => (
            
        )}
    />
    

    0 讨论(0)
提交回复
热议问题