feat: scroll to new position after moving item in menu (#552)
This commit is contained in:

committed by
GitHub

parent
3369454a68
commit
5e2c930551
@@ -506,7 +506,7 @@ function Menu:move_selected_item_to(index)
|
||||
if callback and from and from ~= index and index >= 1 and index <= #self.current.items then
|
||||
callback(from, index, self.current.submenu_path)
|
||||
self.current.selected_index = index
|
||||
request_render()
|
||||
self:set_scroll_by((index - from) * self.scroll_step)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user