Skip to content

Commit

Permalink
Merge branch 'master' into GH-54-make-apply
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrerich committed Aug 21, 2020
2 parents 0fd40c2 + eed9fc7 commit 93d55b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions webapp/src/components/confluence_field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ export default class ConfluenceField extends React.PureComponent {
}

isValid = () => {
const {value, required} = this.props;
if (required && ((typeof value === 'string' && !value.trim()) || !value)) {
const {fieldType, value, required} = this.props;
if (required &&
(value === null ||
(typeof value === 'string' && !value.trim()) ||
(fieldType === 'dropDown' && value.length === 0) ||
!value)
) {
this.setState({
valid: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ exports[`components/ChannelSettingsModal subscription modal snapshot test 1`] =
}
readOnly={false}
removeValidation={[Function]}
required={false}
required={true}
theme={Object {}}
value={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default class SubscriptionModal extends React.PureComponent {
label={'Events'}
name={'events'}
fieldType={'dropDown'}
required={false}
required={true}
theme={this.props.theme}
options={Constants.CONFLUENCE_EVENTS}
value={this.state.events}
Expand Down

0 comments on commit 93d55b1

Please sign in to comment.