We don't need both, or at least, we don't need to always sort by multiaddr in the selectPeers function, if we're going to sort by something else later on.
This issue is great to have! 👏
Some more thoughts, take them or leave them.
debounce or throttle may be enough?I'll take a stab at the sorting issues 👍
@JustMaier that would be RAD! Go for it!
✨🎷🐩
@olizilla during the Web UI call today, we discussed sorting of the location column. The consensus was that ordering by country then city (with Unknown at the end of the list) made the most sense when ordering by that column. With that in mind, I'm wondering if maybe it also makes sense to change what is displayed in that column to match that sorting logic.
So, instead of displaying: Houston, United States
We display: United States, Houston
I think unless we change the display, the ordering in the requested order in the location column might not make sense at first glance.
As for performance issues, looking at the render cycles, it looks like every time a location is resolved it's re-rendering the table. That's why it seems to disappear/reappear while scrolling.
I wonder if maybe it makes more sense to create a multiaddr to location component that we render inside the table's location column. The only problem with that is then we can't sort by location since it's not part of the dataset. Ideas?
@JustMaier Yep, feel free to change the display order of the location.
What if we adjust the table update logic so that it only updates if you are not interacting with it?
Most helpful comment
I'll take a stab at the sorting issues 👍