aurelia / framework

The Aurelia 1 framework entry point, bringing together all the required sub-modules of Aurelia.
MIT License
11.75k stars 623 forks source link

BindPropertyChanged doesn't Fire #856

Closed FunkMonkey33 closed 6 years ago

FunkMonkey33 commented 6 years ago

I'm submitting a bug report

Please tell us about your environment: Windows 10

Current behavior:

If you handle the bind event in your view model, then any bindableChanged events don't fire. This is the case even if the bind() handler is empty.

`@bindable myProperty

bind() { // even an empty method causes this behavior. } myPropertyChanged(newValue, oldValue) { debugger; // this method will never get called. } `

Expected/desired behavior: Not that. It's not really a big deal, because you probably won't ever need both bindableChanged and the bind event, but this tripped me up for several hours.

StrahilKazlachev commented 6 years ago

This is documented in 3. bind(bindingContext: Object, overrideContext: Object).

AshleyGrant commented 6 years ago

@StrahilKazlachev we probably could do a better job of calling this behavior out.

bigopon commented 6 years ago

Yes pls @StrahilKazlachev @AshleyGrant 😄

FunkMonkey33 commented 6 years ago

I see it! Thanks.

And yes, it could be bolder.

Thanks, guys.

Aaron

On Wed, Jan 31, 2018 at 3:06 PM, bigopon notifications@github.com wrote:

Yes pls @StrahilKazlachev https://github.com/strahilkazlachev @AshleyGrant https://github.com/ashleygrant 😄

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aurelia/framework/issues/856#issuecomment-362087029, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjEcRYIvdIsJegRkIvcgkRNHgOnLmdpks5tQOPzgaJpZM4R0Mcc .

AshleyGrant commented 6 years ago

Done! PR Submitted

Alexander-Taran commented 6 years ago

PR looks legit (-: @EisenbergEffect can you please merge it? or decline.. that would require reasoning though..