-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to detect when close button is clicked? #24
Comments
You may watch isOpen changes from true to false instead. |
Hi, In this part: export class NumberWindow {
private static id = 0
id = NumberWindow.id++
isOpen = true
constructor(readonly n = Math.floor(100 * Math.random())) { }
get label() {
return `Number - ${this.n}`
}
} Because this does not work: import { Vue, Component, Watch } from 'vue-property-decorator'
...
export class NumberWindow extends Vue {
private static id = 0
id = NumberWindow.id++
isOpen = true
constructor(readonly n = Math.floor(100 * Math.random())) {
super();
}
get label() {
return `Number - ${this.n}`
}
@Watch('isOpen')
onPropertyChanged(value: string, oldValue: string) {
// Do something
console.log('isOpen has changed');
}
} |
@BryanBuitenhuis I am not familiar with vue's class component syntax, I was doing something like below to detect the isOpen state, hope it helps: updated: I also added a codesandbox sample for reference:
|
Hey!
I'm not sure where to write a question in terms of support cases.
I'm using your library and it's awesome. Thanks for the all hard work.
I have to detect when close button is clicked, but currently, it's only set as a parameter
:closeButton="true"
Could you please let me know how to detect when close button is clicked?
Reagrds,
The text was updated successfully, but these errors were encountered: