+ client: 2154 Make renderCheckboxField a controlled input

This commit is contained in:
ArtemBaskal
2020-10-05 14:53:20 +03:00
parent 8856dd6e4c
commit 0ae00932e9
7 changed files with 38 additions and 30 deletions

View File

@@ -4,7 +4,7 @@ import { Field, reduxForm } from 'redux-form';
import { Trans, withTranslation } from 'react-i18next';
import flow from 'lodash/flow';
import { renderCheckboxField, renderRadioField, toNumber } from '../../../helpers/form';
import { CheckboxField, renderRadioField, toNumber } from '../../../helpers/form';
import { FORM_NAME, QUERY_LOG_INTERVALS_DAYS } from '../../../helpers/constants';
const getIntervalFields = (processing, t, toNumber) => QUERY_LOG_INTERVALS_DAYS.map((interval) => {
@@ -35,7 +35,7 @@ const Form = (props) => {
<Field
name="enabled"
type="checkbox"
component={renderCheckboxField}
component={CheckboxField}
placeholder={t('query_log_enable')}
disabled={processing}
/>
@@ -44,7 +44,7 @@ const Form = (props) => {
<Field
name="anonymize_client_ip"
type="checkbox"
component={renderCheckboxField}
component={CheckboxField}
placeholder={t('anonymize_client_ip')}
subtitle={t('anonymize_client_ip_desc')}
disabled={processing}