You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.
Hi, we have run into a case where watchExcept would be helpful. The idea is instead of including props you exclude them. Our case is we retrieve part of our data and need to watch it while async loading other parts. when we set those parts we don't want the watch to occur. I wrote this is a workaround in our app for now but having this as a feature would be nice.
for (var prop1 in obj) { //for each attribute if obj is an object
if (excludedProps.any(p => p === prop1)) {
continue;
}
if (Object.prototype.hasOwnProperty.call(obj, prop1)) {
props.push(prop1); //put in the props
}
}
WatchJS.watch(obj, props, watcher);
}
The text was updated successfully, but these errors were encountered:
Hi, we have run into a case where watchExcept would be helpful. The idea is instead of including props you exclude them. Our case is we retrieve part of our data and need to watch it while async loading other parts. when we set those parts we don't want the watch to occur. I wrote this is a workaround in our app for now but having this as a feature would be nice.
watchAllExcept = (obj, watcher, excludedProps: string[]) => {
var props: any[] = [];
The text was updated successfully, but these errors were encountered: