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

attr1 and attr2 both change that function can be invoked #85

Open
crypto-studyclub opened this issue Jan 24, 2015 · 2 comments
Open

attr1 and attr2 both change that function can be invoked #85

crypto-studyclub opened this issue Jan 24, 2015 · 2 comments

Comments

@crypto-studyclub
Copy link

Is this feature in Watch JS?
for example:

var a = {
attr1: a,
attr2: b
}

watch(a, ['attr1', 'attr2'], function(){

})

a.attr1 = aa;

a.attr2 = bb;

I want when attr1 and attr2 both change that the function can be invoked.

Does Watch JS support this?

@crypto-studyclub crypto-studyclub changed the title attr1 and attr2 both change thant function can be invoked attr1 and attr2 both change that function can be invoked Jan 24, 2015
@konradpodgorski
Copy link

I must do the same in project I'm working on.

I think simplest workaround would be to use underscore debounce function with small wait time, like 20ms

@melanke
Copy link
Owner

melanke commented Mar 15, 2018

Sadly we don't have this feature, really useful but hard to implement.

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

3 participants