Schema browser: Scrolling should not change table selection

This has bothered me for a long time, so I’d like to hear if there is a special reason for this implementation.

When scrolling (mouse-wheel or scrollbars) vertically, the selected row changes. I don’t like this behavior, especially since this is barely visible (blue marker is not moved).
The behavior is also inconsistent, scrolling horizontally does not affect the selection.

Is there a way to disable this?

I scrolled down in the following example, so when I start typing now, row 4 instead of row 1 is edited.

x.png

Did you get this one?

Thanks, Peter

Hi Peter,

Sorry, I must have missed this one the first time. The grids have a concept of both “selected” node and “focused” node. There can be only one focused row (it is indicated by a triangle on the left) and there can be many selected rows or cells (indicated by dots on the left and of course the selection turns blue). If you click a row, or use arrow keys or pgup/pg/down to navigate, you change both selection and focus. However, as you’ve found, scrolling changes only the focused row.

This is just how the grid behaves, and as far as I know, there’s no way to auto-select the focused node on mouse scroll. One reason you might want this behavior would be if you have row-select enabled and you want to select multiple rows which are not contiguous. You could CTRL+Click to select one, scroll with the mouse wheel to find the next row to select, then CTRL+Click the next, etc.

-John

Hi John,

I think I know how it works right now, I just don’t like it :slight_smile:

In my opinion, scrolling should never change the focus (and I don’t know of any other software that does this). Auto-selecting would be even worse.
This also leads to the unexpected behavior of having to scroll down several times until scrolling actually happens, since focus has to be moved down to the bottom of the table before actually scrolling.

Best regards, Peter

Auto-selecting would be even worse.

Sorry, maybe I was confused. I thought this is what you were asking for. The row with the blue on it is the selected row. I thought you were asking that when you scroll with the mouse, the selected row changes as it does when you use the arrow keys.

No, sorry if I was unclear.

I would prefer if scrolling would not affect focus/selection. Just the same way horizontal scrolling already works.

Michael and I did some digging -

It’s been brought up on the vendor’s support forum and unfortunately, this is just how the grid behaves when it’s in “grid mode”. Toad uses this mode for queries to user tables - Editor and SB-Tables-Data. If we didn’t use this mode, all records would be retrieved for every query, not just the first 500 until you scroll down.

You can get out of grid mode temporarily by rt-clicking and choosing “Memory Sorting”. Be warned, that’s going to pull all records into memory. So don’t do that if the table is very big. That setting doesn’t stick, either. If you re-execute the query, memory sorting turns off.

Thanks for looking into this, really appreciated.

I can definitely live with the current state, just think of me in case the component gets an update or if you should decide to replace it some day :slight_smile:

Thanks, Peter