From 489e92277f85ef5cd1d5b5c46a441b735035397b Mon Sep 17 00:00:00 2001 From: Smidy13 <77650800+Smidy13@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:32:27 +1300 Subject: [PATCH] Bug Fix: Visible Items not updating in ListSelector if new nodes added --- .../Foundations/UI/Spaces/Floating-Space/ListSelector.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js b/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js index 9ffcc847b..c213559c3 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js @@ -47,6 +47,8 @@ function newListSelector() { const SIZE = 36 const FONT_SIZE = 24 + const MAX_LABELS = 7 + let VISIBLE_LABELS = 7 let selected = 0 @@ -107,7 +109,10 @@ function newListSelector() { deactivate() } - if (optionsList.length < VISIBLE_LABELS) { + console.log(optionsList.length) + console.log(VISIBLE_LABELS) + + if (optionsList.length < MAX_LABELS) { VISIBLE_LABELS = optionsList.length }