diff --git a/client/src/components/Settings/LogsConfig/Form.js b/client/src/components/Settings/LogsConfig/Form.js index 5553bbbc..7aa11a81 100644 --- a/client/src/components/Settings/LogsConfig/Form.js +++ b/client/src/components/Settings/LogsConfig/Form.js @@ -13,8 +13,11 @@ import flow from 'lodash/flow'; import { CheckboxField, toFloatNumber, - renderTextareaField, renderInputField, renderRadioField, + renderTextareaField, + renderInputField, + renderRadioField, } from '../../../helpers/form'; +import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers'; import { FORM_NAME, QUERY_LOG_INTERVALS_DAYS, @@ -147,6 +150,7 @@ let Form = (props) => { component={renderTextareaField} placeholder={t('ignore_domains')} disabled={processing} + normalizeOnBlur={trimLinesAndRemoveEmpty} />
diff --git a/client/src/components/Settings/StatsConfig/Form.js b/client/src/components/Settings/StatsConfig/Form.js index 6512639e..857c6d79 100644 --- a/client/src/components/Settings/StatsConfig/Form.js +++ b/client/src/components/Settings/StatsConfig/Form.js @@ -24,6 +24,7 @@ import { CUSTOM_INTERVAL, RETENTION_RANGE, } from '../../../helpers/constants'; +import { trimLinesAndRemoveEmpty } from '../../../helpers/helpers'; import '../FormButton.css'; const getIntervalTitle = (intervalMs, t) => { @@ -135,6 +136,7 @@ let Form = (props) => { component={renderTextareaField} placeholder={t('ignore_domains')} disabled={processing} + normalizeOnBlur={trimLinesAndRemoveEmpty} />