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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Better documentation for sorting and paginating for Table #24521

Open
2 tasks done
dariozachow opened this issue Apr 26, 2024 · 5 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@dariozachow
Copy link

馃敄 Feature description

It is really hard to use the Table Component by Backstage, within your own plugin, because there are no docs for showing how this thing works. The types provided by Table or not really good documented as well.

馃帳 Context

I was trying simple things like custom sorting and server side pagination with the table but failed when trying. When looking in the backstage code I found that this is possible but not that easy as I'm not a frontend dev primarily. Therefore it would be really helpful to have some guidance in how to do such things.

鉁岋笍 Possible Implementation

Update the docs and explain how to do certain things with it. The only thing I found was https://backstage.io/docs/reference/core-components.table/ and the storybook.

馃憖 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

@dariozachow dariozachow added the enhancement New feature or request label Apr 26, 2024
@dariozachow
Copy link
Author

Still struggling with implementing this 馃槗

@vinzscam
Copy link
Member

vinzscam commented May 2, 2024

we do something similar in

* Licensed under the Apache License, Version 2.0 (the "License");

when paginating server side, you want to try to minimize the logic used from the Table component, as everything will be handled server side (on your side). Under the hood, the Table component uses https://material-table-core.github.io/ and all the props are inherited.

@dariozachow
Copy link
Author

Thanks for your answer. I already looked at the paginated Table, but when using the same settings/options for the table the pagination buttons were not clickable. This was kinda confusing and I could not figure out why.

I'll take a look into the material table soon.

@vinzscam
Copy link
Member

vinzscam commented May 2, 2024

ok, keep attention to the page and totalCount props as they are the two props that enable the pagination buttons (it was a small hack 馃槄)

@dariozachow
Copy link
Author

Thanks for the input, I'll try that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants