Skip to content

Commit 34627df

Browse files
BUGFIX: Prevent rendering of SearchBox
When the displaySearchBox property is false, we should not render the SelectBox that is responsible for the search. Fixes: #3673
1 parent f5c3c50 commit 34627df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-ui-components/src/MultiSelectBox/multiSelectBox.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class MultiSelectBox extends PureComponent {
185185
render() {
186186
const {
187187
searchOptions,
188+
displaySearchBox,
188189
values,
189190
optionValueField,
190191
theme,
@@ -217,13 +218,13 @@ class MultiSelectBox extends PureComponent {
217218
disabled={disabled}
218219
/>
219220
</ul>
220-
<SelectBox
221+
{displaySearchBox && (<SelectBox
221222
{...omit(this.props, ['theme', 'className'])}
222223
options={filteredSearchOptions}
223224
value=""
224225
onValueChange={this.handleNewValueSelected}
225226
disabled={disabled}
226-
/>
227+
/>)}
227228
</div>
228229
);
229230
}

0 commit comments

Comments
 (0)