Giter VIP home page Giter VIP logo

Comments (5)

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

Hi @sarah-vo19.

May I ask how are you importing the Active Table component?

In NextJs, you need to import the Active Table React package using the dynamic import function to lazy load it in the UI. Here is example code:

const ActiveTable = dynamic(
  () => import("active-table-react").then((mod) => mod.ActiveTable),
  {
    ssr: false,
  },
);

Here is a live example.

Let me know if this helps. Thanks!

from active-table.

sarah-vo19 avatar sarah-vo19 commented on May 27, 2024

Thank you so much I definitely imported it wrong. The error is gone now. If possible can I ask you too this too?

So in my case, I need to load data from the database and put them in the table, what I understood from the documentation is that I have to use ref to do that, is there anyway I can achieve it using react state? Thank you
image

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

Could you elaborate a little on what you mean by using React state?

The code example you have shown looks good!

May I also ask if you could possibly create a new issue and we can further discuss this matter there to help future readers navigate to issues that are relevant to them.

Thankyou!

from active-table.

sarah-vo19 avatar sarah-vo19 commented on May 27, 2024

Thank you for your response, I've just realized you're using ref so that the table can be used in as many framework as possible.

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 27, 2024

Hey @sarah-vo19. You are correct, I used tableElementRef in my examples in order to provide the most vanilla way of applying property values to the component as it is pretty much the same across all the frameworks. However directly inlining properties and obtaining a reference for the component vary across different frameworks, that's why developers are recommended to checkout the Example Frameworks section to get some insight for their framework of choice :)

If the original question has been answered I will close this issue. Feel free to raise a new issue for anything else.

from active-table.

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.