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

Fix sorting on peers table #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geftactics
Copy link

The peers list table has carets in the column headings, indicating that it should be possible to sort by those fields, which does not seem to be the case.

The PR enables sorting by clicking column heading, and defaults to most recent contacts at the top

Closes #146

Enables sorting by clicking column heading.
Defaults to most recent contacts at the top
@CLAassistant
Copy link

CLAassistant commented Feb 22, 2024

CLA assistant check
All committers have signed the CLA.

@davidlpower
Copy link
Contributor

Hi @geftactics,

I checked out your code to test it out.

The sort is working but there is an edge case I wanted to bring up. I think you will need to update the table state to resort when the web client receives node information. To do that however there is a deeper problem. This table's rows can change dynamically so using index as a key can lead to issues with DOM updates and I think its also contributing to a bug which is messing with your sort.

@fifieldt
Copy link

I tested this patch on my node and it worked well.

It did require clicking the heading to re-sort when new data comes in, but it was still a better experience than no sorting at all :D

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.

Peers list - sorting not working
4 participants