Fixing #29778 - Disable add button when field select is empty (#29779)

This commit is contained in:
Chris Cowan 2019-02-01 10:35:39 -07:00 committed by GitHub
parent 508a776efa
commit ff1af3e1ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,13 @@ export const CustomFieldPanel = injectI18n(
isClearable={false}
/>
</EuiFormRow>
<EuiButton type="submit" size="s" fill onClick={this.handleSubmit}>
<EuiButton
disabled={!this.state.selectedOptions.length}
type="submit"
size="s"
fill
onClick={this.handleSubmit}
>
Add
</EuiButton>
</EuiForm>