mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 08:35:53 +03:00
[GH-ISSUE #1158] Selection is lost when removing filters #1152
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IMNilesAZ on GitHub (Feb 24, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1158
Originally assigned to: @NghiaTranUIT on GitHub.
When you de-select a filter,
Proxyman version? (Ex. Proxyman 1.4.3)
3.1.0
macOS Version? (Ex. mac 10.14)
12.2
Steps to reproduce
add one or more filters
select a row
remove one of your filters
note that a completely different row is now selected. The same "ROW INDEX" in the table might be selected, but not the same "LINE OF DATA" that had previously been selected.
Expected behavior
I would expect the current line to remain selected and in view when removing a filter, because I probably used the filter to find a particular line, and then removed the filter so that I could see the surrounding context, but this context is lost when removing the filter. it looks like you're just preserving maybe the table row index, but what you really should be doing is preserving "the line of data that was selected" (assuming it's still in the data, which it should be if you are REMOVING a filter).
Screenshots (optional)
@NghiaTranUIT commented on GitHub (Feb 25, 2022):
Your observation is correct. The reason why we reset the row index as soon as the filter is updated is that it's really difficult to maintain the previous selection.
Technically, when reloading the table view, all selection data would be wiped out. To maintain the previous selection, I have to look up it again in the huge data source. Since the table view is already sorted by a particular column, might be we can efficiently find it by using the binary search.
I'd open this ticket and implement it soon 👍
@IMNilesAZ commented on GitHub (Feb 25, 2022):
Great. I suspect that even if you had to do a linear search, finding the index column (or whatever it’s called) value in the data source (without involving the table necessarily) wouldn’t take as long as you think on a modern desktop :)