revert: feat: Allow to skip submitting empty values in form data (#5830)

This reverts commit b9b32c9c93.

Refs #6203 #5830
This commit is contained in:
Vladimir Gorej
2020-07-07 15:04:35 +02:00
parent e3b3bf03d4
commit 1b6cb7d1bf
10 changed files with 27 additions and 75 deletions

View File

@@ -3,7 +3,7 @@ import { Map, List } from "immutable"
import PropTypes from "prop-types"
import ImPropTypes from "react-immutable-proptypes"
import win from "core/window"
import { getSampleSchema, getExtensions, getCommonExtensions, numberToString, stringify, isEmptyValue } from "core/utils"
import { getSampleSchema, getExtensions, getCommonExtensions, numberToString, stringify } from "core/utils"
import getParameterSchema from "../../helpers/get-parameter-schema.js"
export default class ParameterRow extends Component {
@@ -343,11 +343,12 @@ export default class ParameterRow extends Component {
}
{
!bodyParam && isExecute && param.get("allowEmptyValue") ?
!bodyParam && isExecute ?
<ParameterIncludeEmpty
onChange={this.onChangeIncludeEmpty}
isIncluded={specSelectors.parameterInclusionSettingFor(pathMethod, param.get("name"), param.get("in"))}
isDisabled={!isEmptyValue(value)} />
isDisabled={value && value.size !== 0}
param={param} />
: null
}