/** * * InputSearch * */ import React from 'react'; import PropTypes from 'prop-types'; import { isEmpty } from 'lodash'; import { FormattedMessage } from 'react-intl'; import cn from 'classnames'; import styles from './styles.scss'; class InputSearch extends React.Component { state = { isFocused: false }; handleBlur = (e) => { this.setState({ isFocused: !this.state.isFocused }); this.props.onBlur(e); } handleFocus = (e) => { this.setState({ isFocused: !this.state.isFocused }); this.props.onFocus(e); } render() { const { autoFocus, className, deactivateErrorHighlight, disabled, error, name, onChange, placeholder, style, tabIndex, value, } = this.props; const formattedPlaceholder = placeholder === '' ? 'app.utils.placeholder.defaultMessage' : placeholder; return (