Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Header repeats multiple times #13

Closed
sharathm89 opened this issue Jul 4, 2023 · 5 comments
Closed

Table Header repeats multiple times #13

sharathm89 opened this issue Jul 4, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@sharathm89
Copy link

sharathm89 commented Jul 4, 2023

Few issues in Table

  • Table header repeats in few scanerios (refer to 1st and 2nd image)
  • Last row from table displays partial information in 1 page and other row details in next page (refer to 3rd image)

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
Copy link
Author

sharathm89 commented Jul 7, 2023

@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 PejmanNik added the bug Something isn't working label Jul 8, 2023
@PejmanNik
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants