Skip to content

Is it possible to Shuffle() without deleting items? #894

Answered by DmitrySharabin
GalinhaLX asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there,

It looks like the mv-action="set(myList, shuffle(myList))" expression leads to some sort of race condition. Try using a computed property instead, like so:

<meta property="foo" content="[shuffle(myList)]" />

<button mv-action="set(myList, foo)">Shuffle (press multiple times)</button>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GalinhaLX
Comment options

Answer selected by GalinhaLX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants