« get me outta code hell

Make firstInput reset scrollItems in ListScrollForm - tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/ui/form
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-12-09 17:23:36 -0400
committerFlorrie <towerofnix@gmail.com>2017-12-09 17:23:36 -0400
commitb83766c92658228e3fb695ffd61b97461216780f (patch)
tree9a2aa14e6bce7147cc006ddb0e4fb27e27cf6a76 /ui/form
parenta800730b9d8d098214f76860422e437514adf35f (diff)
Make firstInput reset scrollItems in ListScrollForm
Diffstat (limited to 'ui/form')
-rw-r--r--ui/form/ListScrollForm.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js
index 7d2b083..daa640a 100644
--- a/ui/form/ListScrollForm.js
+++ b/ui/form/ListScrollForm.js
@@ -106,6 +106,12 @@ module.exports = class ListScrollForm extends Form {
     this.fixLayout()
   }
 
+  firstInput() {
+    this.scrollItems = 0
+
+    super.firstInput()
+  }
+
   getItemPos(item) {
     // Gets the position of the item in an unscrolled view.