The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


What happens to undelivered data?
I got a lot of such


 
Deleted comment
 
Deleted comment

Hi geometry arrow

How can I ensure KTDataTable updates automatically when new data is fetched from the backend? I’m struggling with initializing it correctly in React without needing to manually refresh it.



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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.