Skip to content

Commit df98f63

Browse files
author
evan.henley
committed
feature: alwaysShowLoadingIndicator prop
1 parent e03558b commit df98f63

File tree

9 files changed

+30
-39008
lines changed

9 files changed

+30
-39008
lines changed

dist/@helpdotcom/react-select.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,7 @@ var Select = (0, _createReactClass2['default'])({
10491049

10501050
propTypes: {
10511051
addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input
1052+
alwaysShowLoadingIndicator: _propTypes2['default'].bool,
10521053
'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech)
10531054
'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech)
10541055
'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech)
@@ -1125,6 +1126,7 @@ var Select = (0, _createReactClass2['default'])({
11251126
getDefaultProps: function getDefaultProps() {
11261127
return {
11271128
addLabelText: 'Add "{label}"?',
1129+
alwaysShowLoadingIndicator: false,
11281130
arrowRenderer: _utilsDefaultArrowRenderer2['default'],
11291131
autosize: true,
11301132
backspaceRemoves: true,
@@ -2010,7 +2012,7 @@ var Select = (0, _createReactClass2['default'])({
20102012
},
20112013

20122014
renderMenu: function renderMenu(options, valueArray, focusedOption) {
2013-
if (options && options.length) {
2015+
if (!(this.props.alwaysShowLoadingIndicator && this.props.isLoading) && options && options.length) {
20142016
return this.props.menuRenderer({
20152017
focusedOption: focusedOption,
20162018
focusOption: this.focusOption,

dist/@helpdotcom/react-select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)