No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Vuex with DataTable error when mutating value

    Help
    1
    1
    185
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jjurado last edited by jjurado

      Hi, I’ve got a “problem” with Vuex and DataTable. I’m giving to my DataTable’s prop “data” an Object from Vuex (computed property mapped from state). That Object is a “form” with some fields, and one of them is a DataTable.

      I’ve implemented the logic to ADD and REMOVE rows from that “field” table via Vuex Actions but it throws me the message “Do not mutate vuex store state outside mutation handlers” but, the actual flow of my logic is this:
      HTML DataTable own button “ADD” with @click:“addNewRow(id)” -> vue method that dispatches Vuex’s action insertNewRow(id) -> Action insertNewRow commits a mutation “addNewRow(id)” -> Mutation addNewRow(id) finds the field in the object Form and adds a new row -> Vue warn…

      Any ideas about why i’m getting this warn?

      UPDATED: Add codesandbox example that is a copy of my code BUT in codesandbox is working… https://codesandbox.io/s/mzq48mlq4x

      1 Reply Last reply Reply Quote 0
      • First post
        Last post