Quantcast
Viewing all articles
Browse latest Browse all 4839

Why don't models fire property change hooks?

@robertneville73 wrote:

Please see https://ember-twiddle.com/26abcff088d4ff581b230cab7df178e2?openFiles=models.test.js%2C

When I type into the input fields, the model properties are being modified and the dirtyType on the model is being changed to updated. However, neither set, propertyWillChange or propertyDidChange are (as far as I can tell) being fired on the model.

Either:
a) I'm not really overriding those functions like I think I am
b) I don't understand what those hooks do
c) Something's wonky

I'm really looking for a way to write an observer/CP that says field X was modified anytime any model property changes.

This is of course a means to an end... what I'm really trying to do is have a dirty track on the model that effectively ignores certain attrs (so in my twiddle, maybe I only care if lastname is changed for example) but without specifically setting a CP on every single field.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4839

Trending Articles