Skip to content

Commit

Permalink
- client: Don't unregister field 'Upstream DNS servers' on rerender a…
Browse files Browse the repository at this point in the history
…nd allow input text continuously

Close AdguardTeam#1752

Squashed commit of the following:

commit 2f86ade
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
  • Loading branch information
ArtemBaskal committed May 29, 2020
1 parent 32d1f38 commit 83b9b70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/src/components/Settings/Dns/Upstream/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 83b9b70

Please sign in to comment.