diff options
author | Florrie <towerofnix@gmail.com> | 2018-08-05 13:10:21 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-08-05 13:10:21 -0300 |
commit | 2b1f0b65f1f0eee5a5d621e92e7b64142df0734b (patch) | |
tree | 5b2eb1aba89b3ce95710ade6b37f72e789b7e695 /ui/form | |
parent | 07a667058b9f1ae12e07222b3058d0e2500dd3dc (diff) |
(perf) Make sizeProp not a getter
Diffstat (limited to 'ui/form')
-rw-r--r-- | ui/form/ListScrollForm.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index 77699c2..300fed4 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -39,6 +39,8 @@ module.exports = class ListScrollForm extends Form { // posProp) the next element should be. let nextPos = 0 + this.sizeProp = this.getSizeProp() + for (const item of itemsPastScroll) { item.fixLayout() @@ -160,7 +162,7 @@ module.exports = class ListScrollForm extends Form { .reduce((a, b) => a + b[this.sizeProp], 0) } - get sizeProp() { + getSizeProp() { // The property used to measure the size of an item. If the layoutType // isn't valid (that is, 'horizontal' or 'vertical'), it'll return null. |