Merge pull request #212 from Safelite/feature/CSR-254
CSR-254: pass isDisabled prop down to button main and prevent blocking
This commit is contained in:
commit
c906c2e9c9
2 changed files with 6 additions and 4 deletions
|
|
@ -24,6 +24,7 @@
|
|||
sizeInRem="1"
|
||||
:class="isDisabled && 'form-test-invalid'"
|
||||
:aria-disabled="isDisabled"
|
||||
:isDisabled="isDisabled"
|
||||
@click-event="buttonClick"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<button
|
||||
:disabled="isDisabled"
|
||||
:aria-disabled="isDisabled"
|
||||
class="btn d-flex align-items-center py-3 px-2"
|
||||
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '']"
|
||||
|
|
@ -27,7 +26,7 @@ export default {
|
|||
loaderColor: String,
|
||||
loaderPosition: String,
|
||||
sizeInRem: [Number, String],
|
||||
isFloat: Boolean
|
||||
isFloat: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -36,8 +35,10 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
clicked() {
|
||||
this.isLoaderDisplayed = true;
|
||||
this.$emit("click-event");
|
||||
if (!this.isDisabled) {
|
||||
this.isLoaderDisplayed = true;
|
||||
this.$emit("click-event");
|
||||
}
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue