Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialog button handlers' "this" bound to dialog, not viewmodel #43

Open
oising opened this issue Dec 8, 2014 · 2 comments
Open

dialog button handlers' "this" bound to dialog, not viewmodel #43

oising opened this issue Dec 8, 2014 · 2 comments

Comments

@oising
Copy link

oising commented Dec 8, 2014

I see you've fixed up the events to get bound to the viewmodel, but the following binding does not work correctly:

<div data-bind="dialog: { isOpen: $root.isEditMode, buttons: { Save: $root.save} }"></div>

In the save function, this is bound to the jquery dialog, not the viewmodel.

@RolfVeinoeSorensen
Copy link

Did you ever get this problem solved. I am facing the same issue.

@RolfVeinoeSorensen
Copy link

I created a work around where I did not add the buttons through the handler but just added it to the dialog div like this:
Save

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

No branches or pull requests

2 participants