Giter VIP home page Giter VIP logo

Comments (5)

linmasahiro avatar linmasahiro commented on August 16, 2024

The table loads fine, but I am not sure how to get rid of the warning? Any ideas?

Hi, @Rednas83
I think this problem cause you are used nuxt.js and enabled SSR mode, so it's told you server side's html and client side's html has something different?
You can try to wrap <VueTableLite> with <ClientOnly> , maybe resolve the problem.

<ClientOnly>
    <VueTableLite
        v-if="cindex.type == 'table'"
        :columns="cindex.header"
        :rows="cindex.items"
        :total="cindex.items?.length"
        :page-size="cindex.items?.length < 10 ? cindex.items?.length : 10"
        :sortable="inputs.sortable"
        :is-static-mode="true"
        :has-checkbox="inputs.selectable"
      ></VueTableLite>
</ClientOnly>

from vue3-table-lite.

Rednas83 avatar Rednas83 commented on August 16, 2024

Just tried it with ClientOnly but I still have the warning unfortunately
image
Tried:

  • Restarting the server
  • Making it simpler also didn't work
    <VueTableLite :columns="cindex.header" :rows="cindex.items"></VueTableLite>
  • Using the website example worked without warning. Biggest different that I can see is that my data is asynchronously
    https://github.com/linmasahiro/vue3-table-lite#samplecode

from vue3-table-lite.

Rednas83 avatar Rednas83 commented on August 16, 2024

Moving ClientOnly to the root instead of just VueTableLite caused an error instead of the warning
image
After turning off static mode it now works as expected
image

Any ideas why static mode is not working with nuxt?

from vue3-table-lite.

linmasahiro avatar linmasahiro commented on August 16, 2024

Hi, @Rednas83
It's nuxt3's project? Can you implement the problem on Codesandbox?

from vue3-table-lite.

Rednas83 avatar Rednas83 commented on August 16, 2024

Just tried reproducing it with Sandbox but no problems there so I guess I will have to look further in my application.
https://codesandbox.io/p/sandbox/zdhq6m

The online sandbox gives a permission error but you should be able to open the sandbox in VS Code

I used the provided example but migrated axios to fetch and used a different url because the url in the example was using html instead of json.
image

I will turn off static mode for now in my application.

from vue3-table-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.