how to add key for enter in react and call submit code example Example: on enter key press react onKeyPress={(e) => e.key === 'Enter' && handleSearch()}