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

Single viewmodel for all autocompletes #2

Open
jdbaker opened this issue Oct 21, 2015 · 1 comment
Open

Single viewmodel for all autocompletes #2

jdbaker opened this issue Oct 21, 2015 · 1 comment

Comments

@jdbaker
Copy link

jdbaker commented Oct 21, 2015

Have you ever tested what happens when there are two autocompletes on a single page? Because your binding relies on a singular view model which is not the bound view model, what happened to one autocomplete list happens to all of them. I think I can get this to work, but I'm going to move all the stuff you put in your singleton into the viewmodel which is being bound. Talk about an anti-pattern!

@mynameisandreas
Copy link
Owner

When i built it I only needed 1 VIewmodel so that's why it looks like this. I didnt make it to complicated at the time, becuase I just wanted to keep it simple for me. I didnt need to make it more complicated during time, do you think it's a good idea to break things out, just fork me and give me a suggestion.

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