fix defaults for copy to clipboard action
This commit is contained in:
parent
77114b8838
commit
8a11fcfd06
|
@ -1,19 +1,9 @@
|
|||
<script>
|
||||
import { Label, Checkbox } from "@budibase/bbui"
|
||||
import { onMount } from "svelte"
|
||||
import DrawerBindableInput from "@/components/common/bindings/DrawerBindableInput.svelte"
|
||||
|
||||
export let parameters
|
||||
export let bindings = []
|
||||
|
||||
onMount(() => {
|
||||
if (!parameters.showNotification) {
|
||||
parameters.showNotification = true
|
||||
}
|
||||
if (!parameters.notificationMessage) {
|
||||
parameters.notificationMessage = "Copied to clipboard"
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="root">
|
||||
|
|
|
@ -432,8 +432,9 @@ const copyToClipboardHandler = action => {
|
|||
navigator.clipboard
|
||||
.writeText(textToCopy)
|
||||
.then(() => {
|
||||
if (showNotification && notificationMessage) {
|
||||
notificationStore.actions.success(notificationMessage, true, 3000)
|
||||
if (showNotification) {
|
||||
const message = notificationMessage || "Copied to clipboard"
|
||||
notificationStore.actions.success(message, true, 3000)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
|
Loading…
Reference in New Issue