fix back after scrolling

This commit is contained in:
ruki
2020-12-01 00:30:24 +08:00
parent b491ba18a7
commit 7d7fdcad47
2 changed files with 6 additions and 0 deletions

View File

@@ -51,6 +51,9 @@ function choicebox:load(values, selected)
-- clear the views first -- clear the views first
self:clear() self:clear()
-- reset start index
self._STARTINDEX = 1
-- load items -- load items
local items = {} local items = {}
for idx, value in ipairs(values) do for idx, value in ipairs(values) do

View File

@@ -54,6 +54,9 @@ function menuconf:load(configs)
-- clear the views first -- clear the views first
self:clear() self:clear()
-- reset start index
self._STARTINDEX = 1
-- detach the previous config and view -- detach the previous config and view
local configs_prev = self._CONFIGS._PREV local configs_prev = self._CONFIGS._PREV
if configs_prev then if configs_prev then