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

feat: add reload table button #450

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

roshaans
Copy link
Contributor

Adds a button to refresh the logs from indexer logs page.

@roshaans roshaans requested a review from a team as a code owner December 14, 2023 20:23
@roshaans roshaans requested a review from darunrs December 14, 2023 20:24
@roshaans roshaans linked an issue Dec 14, 2023 that may be closed by this pull request
const reloadData = () => {
indexerLogsRef.current.innerHTML = "";
setTimeout(() => {
initializeTable();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this reset the pagination?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It empties the dom element that represents the table, and then re-renders it thus reseting the table.

if you are on page 6 and reload, you'll be reset back to page 0

@@ -29,6 +29,7 @@ const LogButtons = ({
setHeights,
latestHeight,
isUserIndexer,
reloadData
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should this be called Reload Logs instead?

@darunrs
Copy link
Collaborator

darunrs commented Dec 15, 2023

Also, this is an awesome feature. I'm very happy to see it!

@roshaans roshaans merged commit 8fb35fe into main Dec 15, 2023
2 checks passed
@roshaans roshaans deleted the feat/add-refresh-logs-button branch December 15, 2023 17:58
@morgsmccauley morgsmccauley mentioned this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs widget automatic refresh with subscriptions
3 participants