« get me outta code hell

Fix mistake in Form.addInput - 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>2018-12-15 01:31:52 -0400
committerFlorrie <towerofnix@gmail.com>2018-12-15 01:31:52 -0400
commite47a3546f0f9244bb6ee3aa708e7e24226fbdad2 (patch)
tree103b3f94287a2c937bc0dc833982dfe3b0e7873e /ui/form
parentd54498610d53e8c8a437a6adff0ced11b037afe7 (diff)
Fix mistake in Form.addInput
TL;DR afterIndex was not being set correctly.
Diffstat (limited to 'ui/form')
-rw-r--r--ui/form/Form.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/form/Form.js b/ui/form/Form.js
index 7a82b31..3c59cf5 100644
--- a/ui/form/Form.js
+++ b/ui/form/Form.js
@@ -19,7 +19,7 @@ module.exports = class Form extends FocusElement {
     this.inputs.push(input)
 
     if (asChild) {
-      this.addChild(input, opts)
+      this.addChild(input, this.children.length, opts)
     }
   }