Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

KTDataTable in React


I have a problem like this. I want to initialize Datatable with js. I am getting the data from the backend. However, when KTDataTable is initialized first, the data does not come without updating KTDataTable (for example, when clicking the sort button). That's why I need a KTDataTable usage example that was previously made in React.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi. May i see a usage of KTDataTable in react? no javascript, I want to see it in a react code.



Hi,

In our React version, we do not have our own datatables component. We are using Tanstack tables, you can find usage examples on Users Managment page.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

I am using Metronic-v9.0.3.



Hi,

I want to apologize for the delay in reply.

Could you please provide us with the code example you are using?

If you want to regenerate your component you can try to trigger the same datatable initialization function you call on the first load.

Also, you can find datatable component usage examples in our documentation:
https://keenthemes.com/metronic/tailwind/docs/components/datatable

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Thank you for reaching out to us.

Could you please specify which Metronic version you are using?

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(