-
Notifications
You must be signed in to change notification settings - Fork 8
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
Multiple listener fields #5
Comments
Sorry no time to look in to currently. Cant remember te exact mechanics. |
haveing the same issue, any ideas? |
I've forked the repo and started working on the fix... |
Looking forward for it, please notify me ASAP that fix is done, i would appreciate it |
should be fixed by:Saifallak in: #8 |
Nope, it doesn't,,.. |
Reopend |
Soo... After a little bit of investigation, it seems that the problem is with VueJS and how Nova handles it. It's easy to fix, once you know the problem... Due to the extensive modifications on the code base, I cannot share my fork atm... it's still a work in progress, however, here's the mixin created to do this 😄 import _ from "lodash";
export default {
data() {
return {
updater: {}
}
},
created() {
Nova.$on(this.field.listensTo, this.messageReceived)
this.$set(this.updater, this.field.attribute, _.debounce((force = false) => {
this.calculating = true;
Nova.request().post(
`/zenosyne/calculatron/calculatron/${this.resourceName}/${this.field.attribute}`,
this.field_values
).then((response) => {
if (
!(response.data.disabled && this.field.isUpdating)
||
force
) {
this.value = response.data.value
}
this.calculating = false;
}).catch(() => {
this.calculating = false;
});
}, 300));
},
methods: {
messageReceived(message) {
this.field_values[message.field_name] = message.value;
this.calculateValue()
},
calculateValue(force = false) {
this.updater[this.field.attribute](force);
}
}
}; |
looking forward for your fork/solution @blackfyre |
Is there a way to add multiple listener fields?
Currently only 1 listener seems to be working on each channel...
update: having the broadcaster field broadcast to multiple channel doesn't seem to solve the problem
The text was updated successfully, but these errors were encountered: