Skip to content

x-for for CSP build #2724

Mar 4, 2022 · 6 comments · 9 replies
Discussion options

You must be logged in to vote

I just found a workaround for anybody having this same issue. Hopefully the CSP plugin will be updated to fix these sorts of issues in the future, but here's the workaround:

  <template x-for="item in items">
      <h1 x-text="getItemTitle"></h1>
  </template>

Then in getItemTitle I just access the item object via this.$data.item.title.

Replies: 6 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@MichaelMackus
Comment options

@SimoTod
Comment options

@SimoTod
Comment options

@MichaelMackus
Comment options

@motdotenv
Comment options

Answer selected by MichaelMackus
Comment options

You must be logged in to vote
1 reply
@delete-all
Comment options

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants