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

`.splice` and `.unshift` methods don't work with each={blah in blahs} and each={blahs} #2228

CosmoMyzrailGorynych opened this issue Jan 19, 2017 · 2 comments


Copy link

@CosmoMyzrailGorynych CosmoMyzrailGorynych commented Jan 19, 2017

1. Describe your issue:

.splice and .unshift methods are causing tag (both Riot and HTML) duplicates and unstable behaviour. See the punker for details.

2. Can you reproduce the issue?

You may randomly click the three buttons and will see that actual JSON differs from what is displayed. Only a dirty hack with emptying and updating works.

3. On which browser/OS does the issue appear?

Everywhere, it is web

4. Which version of Riot does it affect?

Possibly versions 3.0.6 and next. There were no such sympthoms in a real app with v3.0.5

5. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
Copy link

@CosmoMyzrailGorynych CosmoMyzrailGorynych commented Jan 19, 2017

Yeah, I've just managed to find more bugs and updated plunker. It is inconsistent between looped riot tags and html tags. Still, bugs everywhere.

If you press unshift two times, there will be one normal Slim in each list and a bold Slim in tags. This affects only riot-tag loops or each={blahs} loops with no-reorder.

If we use no-reorder with html tags, with each={blah in blahs}, they behave as intended, meaning that there are no duplicates and data anomalies.

Copy link

@GianlucaGuarini GianlucaGuarini commented Jan 20, 2017

thanks @CosmoMyzrailGorynych it's a duplicate of #2205 I will keep it open because your example seems to be much better

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.