macOS: command pallete scroll improvements
Removes the withAnimation closure which caused flashing when scrolling up or down with arrow keys. Also removes the center anchor to behave more like other command palletes (e.g., Zed, Raycast).pull/7171/head
parent
17b0bf585d
commit
b4b2b10328
|
|
@ -177,11 +177,8 @@ fileprivate struct CommandTable: View {
|
|||
.frame(maxHeight: 200)
|
||||
.onChange(of: selectedIndex) { _ in
|
||||
guard selectedIndex < options.count else { return }
|
||||
withAnimation {
|
||||
proxy.scrollTo(
|
||||
options[Int(selectedIndex)].id,
|
||||
anchor: .center)
|
||||
}
|
||||
proxy.scrollTo(
|
||||
options[Int(selectedIndex)].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue