PejmanNik / jikji

Effortless report generator and reporting tools with React and NodeJS
https://jikji.pejmannik.dev/
MIT License
50 stars 1 forks source link

Table Header repeats multiple times #13

Closed sharathm89 closed 1 year ago

sharathm89 commented 1 year ago

Few issues in Table

Here is the github repo link which demonstrates table (issues) in it. (checkout the readme file)

Repo Link

Image 1 - header repeating

Screenshot 2023-07-04 at 2 19 13 PM

Image 2- header repeating

Screenshot 2023-07-04 at 2 19 22 PM

Image 3 - last row from page is truncatted and remaining displayed in next page

Screenshot 2023-07-04 at 2 19 33 PM
sharathm89 commented 1 year ago

@PejmanNik these table issues are freqently occuring .. apart from the table issues the library is amazing to develop reports... thanks a lot for this library...

PejmanNik commented 1 year ago

I'll try to find the issue, but you are using the library wrongly. if you want to load static JSON data please check inject JSON data, basically if the page is not instantly ready to be parsed (like how you are reading the JSON file) you need to notify the library to wait for it.

You can use that Inject JSON data component or the using the use-layout-suspension hook to build your own version of it

PejmanNik commented 1 year ago

The header duplication should be fixed in v0.3.2, I couldn't reproduce the second one, can you please check it again with the last version?

sharathm89 commented 1 year ago

header duplication issue seems to be fixed... Other issue let me do a workaround as per your suggestions...

But ideally in my scanerio I would be making api call to fetch the data (Loading data through JSON files is for testing purpose)

PejmanNik commented 1 year ago

Ok good to know. So I'll close this issue

For API call you can check this Component: QuoteFromAPI

Components will mount and unmount during the layout process at least two times. In order to have better performance, it is better to use a library like react-query that cache the API response. So the component only gets the data one time per layout.