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

Closed
CosmoMyzrailGorynych opened this Issue Jan 19, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@CosmoMyzrailGorynych

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?

Yup: http://plnkr.co/edit/EElMoOaIU9JToQBYQ68z?p=preview
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
@CosmoMyzrailGorynych

This comment has been minimized.

Show comment
Hide comment
@CosmoMyzrailGorynych

CosmoMyzrailGorynych 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.

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.

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Jan 20, 2017

Member

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

Member

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