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