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

Keep the selected line in the viewport when removing the filter #34

Open
joffrey-bion opened this issue Feb 16, 2016 · 1 comment
Open

Comments

@joffrey-bion
Copy link
Owner

If I select a log line and remove my filter, I am brought to a completely different place (to the top or the bottom, depending on whether tailing is activated).
It would be nice to keep that selected line in the view port when the filter changes.

@joffrey-bion
Copy link
Owner Author

joffrey-bion commented Oct 16, 2016

The extra computation for live updates of the scroll as the filter is changed might be tricky to handle.

  • If the filter gets more restrictive, the selected line could disappear.
  • If the selected line does not disappear, its index is likely to change among the new filtered list. An indexOf() might be needed on the list to retrieve the new row index of the formerly selected element, and this will happen on each key stroke in the filter field, which might cause some unwanted freezes. Launching a cancellable background task to do this job might be a solution, but is it worth it now that we have the search feature?

A simpler solution matching the standard use case would be to just implement that auto-scroll to selected line when the "clear" button is used in the filter, but that little cross is encapsulated in the library and some dirty reflection might be required to achieve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant