diff --git a/webapp/src/components/confluence_field.jsx b/webapp/src/components/confluence_field.jsx index 9c4ef60..b27c416 100644 --- a/webapp/src/components/confluence_field.jsx +++ b/webapp/src/components/confluence_field.jsx @@ -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, }); diff --git a/webapp/src/components/subscription_modal/__snapshots__/subscription_modal.test.jsx.snap b/webapp/src/components/subscription_modal/__snapshots__/subscription_modal.test.jsx.snap index 5c819d1..46731d1 100644 --- a/webapp/src/components/subscription_modal/__snapshots__/subscription_modal.test.jsx.snap +++ b/webapp/src/components/subscription_modal/__snapshots__/subscription_modal.test.jsx.snap @@ -171,7 +171,7 @@ exports[`components/ChannelSettingsModal subscription modal snapshot test 1`] = } readOnly={false} removeValidation={[Function]} - required={false} + required={true} theme={Object {}} value={ Array [ diff --git a/webapp/src/components/subscription_modal/subscription_modal.jsx b/webapp/src/components/subscription_modal/subscription_modal.jsx index 3b2b5d8..5e10f25 100644 --- a/webapp/src/components/subscription_modal/subscription_modal.jsx +++ b/webapp/src/components/subscription_modal/subscription_modal.jsx @@ -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}