Skip to content

Commit 9f82da2

Browse files
committed
Replace tabs in README with two spaces
1 parent 14f199c commit 9f82da2

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ When the value is changed, `onChange(selectedValueOrValues)` will fire.
7878
var Select = require('react-select');
7979

8080
var options = [
81-
{ value: 'one', label: 'One' },
82-
{ value: 'two', label: 'Two' }
81+
{ value: 'one', label: 'One' },
82+
{ value: 'two', label: 'Two' }
8383
];
8484

8585
function logChange(val) {
86-
console.log("Selected: " + val);
86+
console.log("Selected: " + val);
8787
}
8888

8989
<Select
90-
name="form-field-name"
91-
value="one"
92-
options={options}
93-
onChange={logChange}
90+
name="form-field-name"
91+
value="one"
92+
options={options}
93+
onChange={logChange}
9494
/>
9595
```
9696

@@ -113,8 +113,8 @@ You can enable multi-value selection by setting `multi={true}`. In this mode:
113113
* By default, selected options can be cleared. To disable the possibility of clearing a particular option, add `clearableValue: false` to that option:
114114
```javascript
115115
var options = [
116-
{ value: 'one', label: 'One' },
117-
{ value: 'two', label: 'Two', clearableValue: false }
116+
{ value: 'one', label: 'One' },
117+
{ value: 'two', label: 'Two', clearableValue: false }
118118
];
119119
```
120120
Note: the `clearable` prop of the Select component should also be set to `false` to prevent allowing clearing all fields at once
@@ -135,17 +135,17 @@ Unless you specify the property `autoload={false}` the control will automaticall
135135
var Select = require('react-select');
136136

137137
var getOptions = function(input, callback) {
138-
setTimeout(function() {
139-
callback(null, {
140-
options: [
141-
{ value: 'one', label: 'One' },
142-
{ value: 'two', label: 'Two' }
143-
],
144-
// CAREFUL! Only set this to true when there are no more options,
145-
// or more specific queries will not be sent to the server.
146-
complete: true
147-
});
148-
}, 500);
138+
setTimeout(function() {
139+
callback(null, {
140+
options: [
141+
{ value: 'one', label: 'One' },
142+
{ value: 'two', label: 'Two' }
143+
],
144+
// CAREFUL! Only set this to true when there are no more options,
145+
// or more specific queries will not be sent to the server.
146+
complete: true
147+
});
148+
}, 500);
149149
};
150150

151151
<Select.Async
@@ -168,8 +168,8 @@ import Select from 'react-select';
168168
/*
169169
* assuming the API returns something like this:
170170
* const json = [
171-
* { value: 'one', label: 'One' },
172-
* { value: 'two', label: 'Two' }
171+
* { value: 'one', label: 'One' },
172+
* { value: 'two', label: 'Two' }
173173
* ]
174174
*/
175175

@@ -183,9 +183,9 @@ const getOptions = (input) => {
183183
}
184184

185185
<Select.Async
186-
name="form-field-name"
187-
value="one"
188-
loadOptions={getOptions}
186+
name="form-field-name"
187+
value="one"
188+
loadOptions={getOptions}
189189
/>
190190
```
191191

@@ -200,8 +200,8 @@ var isLoadingExternally = true;
200200

201201
<Select
202202
name="form-field-name"
203-
isLoading={isLoadingExternally}
204-
...
203+
isLoading={isLoadingExternally}
204+
...
205205
/>
206206
```
207207

@@ -307,7 +307,7 @@ You can manipulate the input using the onInputChange and returning a new value.
307307

308308
```js
309309
function cleanInput(inputValue) {
310-
// Strip all non-number characters from the input
310+
// Strip all non-number characters from the input
311311
return inputValue.replace(/[^0-9]/g, "");
312312
}
313313

0 commit comments

Comments
 (0)