- client: Don't unregister field 'Upstream DNS servers' on rerender and allow input text continuously

Close #1752

Squashed commit of the following:

commit 2f86ade71eadd648fe3e62d8f619d5f1419d6527
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri May 29 10:58:42 2020 +0300

    - client: Don't unregister field 'Upstream DNS servers' on rerender and allow input text continuously
This commit is contained in:
Artem Baskal 2020-05-29 11:12:43 +03:00
parent 32d1f385ff
commit 83b9b70166

View File

@ -5,7 +5,6 @@ import { Field, reduxForm, formValueSelector } from 'redux-form';
import { Trans, withTranslation } from 'react-i18next';
import flow from 'lodash/flow';
import classnames from 'classnames';
import { nanoid } from 'nanoid';
import Examples from './Examples';
import { renderRadioField } from '../../../../helpers/form';
@ -63,7 +62,7 @@ let Form = (props) => {
<div className="row">
{INPUT_FIELDS.map(({
name, component, type, className, placeholder, getTitle, subtitle, disabled, value,
}) => <div className="col-12 mb-4" key={nanoid()}>
}) => <div className="col-12 mb-4" key={placeholder}>
{typeof getTitle === 'function' && getTitle()}
<Field
id={name}