Skip to content

Commit

Permalink
add disable input support for ui-select (#1532)
Browse files Browse the repository at this point in the history
kiln property takes precedence over user actions
  • Loading branch information
macgyver authored Aug 16, 2021
1 parent 25e8521 commit ead7e62
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions inputs/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
:label="label"
:floatingLabel="true"
:help="args.help"
:disabled="disabled"
:disabled="isDisabled"
:error="errorMessage"
:invalid="isInvalid"
iconPosition="right"
Expand Down Expand Up @@ -114,7 +114,7 @@
data() {
return {
listOptions: [],
isDisabled: false
userDisabled: false
};
},
mounted() {
Expand Down Expand Up @@ -209,6 +209,9 @@
},
isInvalid() {
return !!this.errorMessage;
},
isDisabled() {
return this.disabled || this.userDisabled;
}
},
methods: {
Expand Down Expand Up @@ -252,10 +255,10 @@
return promise;
},
disableInput() {
this.isDisabled = true;
this.userDisabled = true;
},
enableInput() {
this.isDisabled = false;
this.userDisabled = false;
}
},
components: {
Expand Down

0 comments on commit ead7e62

Please sign in to comment.