Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Vue "this" issue #2

Open
bshorrosh opened this issue Jun 22, 2020 · 1 comment
Open

Vue "this" issue #2

bshorrosh opened this issue Jun 22, 2020 · 1 comment

Comments

@bshorrosh
Copy link

bshorrosh commented Jun 22, 2020

Suggest to update the mounted code to include the following, which fixes the "this" reference inside Wails.Events...

mounted() {
let that = this
Wails.Events.On("filemodified", () => {
that.loadList();
});
Wails.Events.On("error", (message, number) => {
let result = number * 2;
that.setErrorMessage(${message}: ${result});
});
// Load the list at the start
that.loadList();
}

@leaanthony
Copy link
Member

Happy to accept a PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants