Conversation
bpasero
left a comment
There was a problem hiding this comment.
I only looked at pickerQuickAccess.ts
| const removed = items.splice(index, 1); | ||
| const activeItems = input.activeItems.filter((ai) => ai !== removed[0]); | ||
| const resetScrollPositionBefore = input.resetScrollPosition; | ||
| input.resetScrollPosition = false; |
There was a problem hiding this comment.
It still resets when you remove the item?
There was a problem hiding this comment.
Yes because all it's doing is setting items which triggers an update which triggers the reset of the scroll position.
| } | ||
|
|
||
| get scrollTop() { | ||
| return this.list.scrollTop; |
There was a problem hiding this comment.
Unsure about the list-widget but for the tree there is getViewState which captured scroll position and selection. I happily use that for the outline when switching between editors - might be an option for the list too...
There was a problem hiding this comment.
I didn't see a getViewState equivalent in my look around the list-widget but good to know!
|
|
||
| autoFocusOnList: boolean; | ||
|
|
||
| resetScrollPosition: boolean; |
There was a problem hiding this comment.
For the API, I would turn this around because default values are never true
There was a problem hiding this comment.
flipped it around and called it keepScrollPosition: boolean
Adds a new property to quick picks called:
resetScrollPosition: booleanwhich defaults to
truethat controls whether or not the cursor position will be reset to the top when either
itemsoractiveItemsare changed.This PR fixes #109969