'Material UI: Get value of Textfield when clicking InputAdornment

I'm trying to get value of Textfield after clicking the InputAdornment icon. When using OnChange, things were looking fine, now I'm getting undefined

<Textfield
    id="search"
    label="SEARCH"
    InputProps={{
     endAdornment: 
       <InputAdornment position="end">
         <FontAwesomeIcon icon={faSearch} onClick={(e) =>console.log(e.target.value)} />. 
       </InputAdornment> )
    }}
 />


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source