Skip to content

Commit

Permalink
fix: add watcher to update state when lightbox opens, remove deprecat…
Browse files Browse the repository at this point in the history
…ed click attribute
  • Loading branch information
mcstover committed Sep 27, 2024
1 parent 8f06dd9 commit 04cf84f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/Autolending/AutolendingStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
data-test="status-save-button"
class="smaller button"
v-if="!isSaving"
@click.native="save"
@click="save"
:disabled="!isChanged"
>
Save
Expand Down Expand Up @@ -151,6 +151,14 @@ export default {
mounted() {
// After initial value is loaded, setup watch
this.$watch('autolendingStatus', this.watchAutolendingStatus);
this.$watch('showLightbox', next => {
if (next) {
this.autolendingStatus = this.setAutolendingStatus({
isEnabled: this.isEnabled,
pauseUntil: this.pauseUntil
});
}
});
},
methods: {
watchAutolendingStatus() {
Expand Down

0 comments on commit 04cf84f

Please sign in to comment.