From b26851b1a78dc6d3797e2cba92444a6485d4dc63 Mon Sep 17 00:00:00 2001 From: charlyschulte Date: Mon, 15 Nov 2021 18:23:55 +0100 Subject: [PATCH] Update index.js Added variable showoptions attribute. --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 665fba2..8354be0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -27,12 +27,13 @@ function SelectBox({ multiListEmptyLabelStyle, listEmptyLabelStyle, selectedItemStyle, + showOptionsOnRender=false, listEmptyText = 'No results found', ...props }) { const [inputValue, setInputValue] = useState('') - const [showOptions, setShowOptions] = useState(false) + const [showOptions, setShowOptions] = useState(showOptionsOnRender) function renderLabel(item) { const kOptionsLabelStyle = {