Skip to content

[BUGFIX beta] Call ArrayProxy's content change hooks#14117

Merged
rwjblue merged 1 commit intoemberjs:masterfrom
mmun:call-array-proxy-content-change-hooks
Aug 26, 2016
Merged

[BUGFIX beta] Call ArrayProxy's content change hooks#14117
rwjblue merged 1 commit intoemberjs:masterfrom
mmun:call-array-proxy-content-change-hooks

Conversation

@mmun
Copy link
Member

@mmun mmun commented Aug 23, 2016

Provides some temporary relief for #14114.

@rwjblue
Copy link
Member

rwjblue commented Aug 23, 2016

@workmanw / @mmun - Can you confirm this fixes the addon?

@workmanw
Copy link

workmanw commented Aug 23, 2016

You need to also update the replace implementation on Ember.NativeArray to use the member methods. See: system/native_array.js#L55-L74

If you ping me after that, I'd be happy to verify the fix using the addon. Thank you.

@workmanw
Copy link

workmanw commented Aug 23, 2016

@mmun @rwjblue Actually I retract my previous statements. This actually does fix the issue because the array-mixins implementation of replace invokes sendEvent('@array:change') and Ember.ArrayProxy ultimately circles back around and calls the member function via it's array observer. So 👍.

Thank you guys. Post Ember 2.8 LTS I'm happy to work to patch ember-data-model-fragments so it doesn't depend on this behavior. It seems like setting up another array observer in their arrays could be a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants