Comments (7)
If the code in the debugger is too small:
confirmDelete() {
this.$vueConfirm.confirm(
{
auth: false,
message: `Are you sure you want to delete?`,
button: {
no: 'No',
yes: 'Yes'
}
},
function(confirm) {
if (confirm == true) {
this.deleteSelectedUsers()
}
}
)
},
Also I have initialized it correctly , otherwise it wouldn't show. I am using firefox - could this be the issue.
from vue-confirm-dialog.
How do you trigger confirmDelete function? Can you use "stop" modifier?
<tag @click.stop="confirmDelete()"> foo </tag>
You also need to define a variable for scope. So your code should be like below.
confirmDelete() {
let self = this
this.$vueConfirm.confirm(
{
auth: false,
message: `Are you sure you want to delete?`,
button: {
no: 'No',
yes: 'Yes'
}
},
function(confirm) {
if (confirm == true) {
self.deleteSelectedUsers()
}
}
)
},
from vue-confirm-dialog.
Thanks. I will try this tomorrow. The problem that I think the stop modifier would create is that the action dropdown would not close on click.
The actual event is emitted on click from the child DataTable
component ( a component that is wrapping the datatable , search, pagination and action dropdown that you see above. ) . The emitted event is captured in the parent component that calls the confirmDelete method.
from vue-confirm-dialog.
I think I have the same issue.
I have a button which calls a method on click. This method calls this.$vueConfirm.confirm(...)
As soon as the dialog opens, it closes immediately.
I found that the documentClick method is launched on every click on the page and seems to be the problem. Maybe we should check if the dialog is open before emiting the close event?
vue-confirm-dialog/src/vue-confirm-dialog.vue
Lines 99 to 105 in 239eaf9
from vue-confirm-dialog.
I have the same issue.
The confirmation dialog apper for just few seconds, and then disappear without clicking
from vue-confirm-dialog.
I'm working on the new version. I will solve this bug in a short time.
from vue-confirm-dialog.
This bug is solved the vesion 1.0.1. This version have major changes. Please read to README.
README:
https://github.com/aslanon/vue-confirm-dialog/blob/master/README.md
RELEASE:
https://github.com/aslanon/vue-confirm-dialog/releases/tag/v1.0.1
from vue-confirm-dialog.
Related Issues (16)
- Allow click on overlay to exit without running callback assuming false HOT 4
- Is it ready for Nuxt? HOT 5
- Can I include html in the message when using the API? is that supported? HOT 8
- can i change the color of the button? as well as the the dialog box color?
- can i add or edit style to spesific class? i want to change modal width in vc-container class
- Have to click on 'Yes' button twice to close the dialog
- Dialog title does not change.
- [Vue warn]: Unknown custom element: <vue-confirm-dialog> - did you register the component correctly?
- Modal is not closing itself after click HOT 3
- Vue 3 Support HOT 1
- how to use vuex for $confirm?
- Yay! You broke it.. HOT 5
- When it will be compatible for vue 3 HOT 2
- version for TypeScript
- Nuxt 2.15.7 vue-confirm-dialog not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-confirm-dialog.