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

    Is it possible to do a CodePen with axios hitting a DB?

    Help
    2
    3
    213
    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.
    • R
      rconstantine last edited by

      Hi,

      I’ve been having issues with q-table not updating after Vuex store data is refreshed. My code is too complicated to simply copy to a codepen, but I figure I at least need to use the same components in order to duplicate the issue. My DB is behind a corporate firewall, and I don’t have any online DBs I can use. Does anyone have suggestions for how I can create a representative duplicate of my code?

      What I see is this:

      1. I have a table with a column which includes action buttons (copy row, up vote, and down vote).
      2. My data has that nifty popup in place editor so I can edit the data.
      3. I do not update the Vuex data store directly before sending to the DB. Instead, I send only the change to the DB, then reload all of the data and store it again in the Vuex store. When this happens, the table does not always reflect the change!
      4. Likewise when I use any of the action buttons - no updates reflected.
      5. In both cases, changes are not reflected, but the data IS pushed to the DB and the request for new data is accomplished according to the log of my backend and the DB itself.

      If I log out of my application, then hit CTRL+F5 to hard refresh, then login, everything works like it is supposed to. That says to me there is a memory issue. I use Chrome, latest version, have had this problem for several versions.

      Alternatively, is there a way to programmatically do the same thing as a CTRL+F5?

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @rconstantine last edited by dobbel

        @rconstantine

        Updates not being reflected sounds like you might have vue reactivity issues. Updating arrays or objects in Vue the normal js way (instead of the Vue way) results in updates not being reflected:

        https://vuejs.org/v2/guide/reactivity.html

        btw you can use https://ngrok.com/ to tunnel trough a firewall.

        1 Reply Last reply Reply Quote 0
        • R
          rconstantine last edited by

          @dobbel Thanks for the reactivity note. I found this: https://stackoverflow.com/questions/59107201/vue-component-not-immediately-updating-after-associated-data-changes

          And I’m currently testing my changes. I think I mentioned that the weird thing was that SOMETIMES reactivity was working, but other times it wasn’t. I’m hoping using getters will make them always work. Note that with always refreshing the data, I was never actually updating sub-items of an array. Instead, I was replacing the whole array.

          In any case, I do think you’re right about it being a reactivity issue, so that is where I’m focused now. Thanks for the reply.

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