-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reintroduce
LoadingButton
component to fix creation modal subm…
…ission This PR addresses the issue where the removal of `LoadingButton` since Nova 4.28 prevented submission in the creation modal. The component has been restored under a new name, resolving issue #92.
- Loading branch information
1 parent
05e2ad9
commit 92b1577
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<component v-bind="{ size, align, ...$attrs }" :is="component" ref="button"> | ||
<span :class="{ invisible: processing || loading }"> | ||
<slot /> | ||
</span> | ||
|
||
<span | ||
v-if="processing || loading" | ||
class="absolute" | ||
style="top: 50%; left: 50%; transform: translate(-50%, -50%)" | ||
> | ||
<Loader class="text-white" width="32" /> | ||
</span> | ||
</component> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
size: { | ||
type: String, | ||
default: 'lg', | ||
}, | ||
align: { | ||
type: String, | ||
default: 'center', | ||
validator: v => ['left', 'center'].includes(v), | ||
}, | ||
loading: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
processing: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
component: { | ||
type: String, | ||
default: 'DefaultButton', | ||
}, | ||
}, | ||
methods: { | ||
focus() { | ||
this.$refs.button.focus() | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters