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

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Fix sorting on peers table #165

merged 2 commits into from
Jun 21, 2024

Conversation

geftactics
Copy link
Contributor

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
Contributor

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

@Hunter275
Copy link
Member

Hunter275 commented Jun 15, 2024

This has been fixed in another PR.


@geftactics I get an error when sorting by the new "Connection" column that was added:

image

The other columns work fine so I'm sure it's a simple fix.

Let me know if you need me to fix this bug, if not just update this PR and I'll merge it.

I'll check back in a week or so and fix it if it's not done by then.

@Hunter275
Copy link
Member

Sorting "Last Heard" doesn't seem to work:

image

@Hunter275 Hunter275 added bug Something isn't working help wanted Extra attention is needed minor change This is a minor change labels Jun 16, 2024
@Hunter275 Hunter275 merged commit 6b268b7 into meshtastic:master Jun 21, 2024
2 of 3 checks passed
@Hunter275
Copy link
Member

Good work @geftactics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed minor change This is a minor change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peers list - sorting not working
5 participants