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

select with v-model stuck in an endless loop #3104

Closed
envomer opened this issue Jun 18, 2016 · 3 comments
Closed

select with v-model stuck in an endless loop #3104

envomer opened this issue Jun 18, 2016 · 3 comments

Comments

@envomer
Copy link

envomer commented Jun 18, 2016

Hi, i came across something weird after upgrading to the latest 1.0.25 release. I tried everything but i wasn't able to reproduce it on jsfiddle. Sorry 😢

My problem: v-model with select element. For some reason my app gets stuck in a loop when i paginate into a page that has a select tag with v-model

<select v-model="foo">
  <option v-for="group in groups.data" :value="group.id">{{ group.id }}<option>
</select>

So i snooped around the vue source and found out that my problem lies on line 55 to 57 of the "handle v-model select initial value edge cases in IE (fix #2983)" commit.
Link: aab74bd

If i comment out line 56 ["return nextTick(this.forceUpdate)"] of the commit, everything works smoothly.

I am using vueify, vue-router and vue-resource.

Vue.js version

1.0.25

Reproduction Link

Wasn't able to re-produce it

@envomer envomer changed the title select with v-model stuck in a endless loop select with v-model stuck in an endless loop Jun 18, 2016
@billowapp
Copy link

billowapp commented Jun 27, 2016

getting the exact same issue here, rolled back to 1.0.24 and everything is working as it should.

@Sreilys
Copy link

Sreilys commented Jul 5, 2016

I still have the "select with v-model stuck in an endless loop" problem.. any suggestion? Thanks

@crtjr64
Copy link

crtjr64 commented Sep 12, 2018

I have the same issues. I've created 4 custom drop down lists out of bootstrap's toggle switch to create a list of check boxes for each list. When one is selected it affects the other three to filter those options. Each are created using a getter. within these getters is where the underlying arrays are restricted which automatically affects the selected check boxes and the getters use these arrays to filter the options. There are times when it works, but as I am debugging the code to resolve any bugs I've often fallen into a trap where it permanently loops. It seems controlled by the vender.js file that just calls the other getters for some reason. Not sure why this has to happen because when I turn off the method that filters and selects the underlying arrays any action to one still causes the other getters to run

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

No branches or pull requests

5 participants