We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5703ce commit 5174140Copy full SHA for 5174140
src/components/dropdown/index.js
@@ -333,14 +333,22 @@ export default class Dropdown extends PureComponent {
333
}
334
335
onSelect(index) {
336
- let { data, valueExtractor, onChangeText, animationDuration } = this.props;
+ let {
337
+ data,
338
+ valueExtractor,
339
+ onChangeText,
340
+ animationDuration,
341
+ rippleDuration,
342
+ } = this.props;
343
+
344
let value = valueExtractor(data[index], index);
345
+ let delay = Math.max(0, rippleDuration - animationDuration);
346
347
if ('function' === typeof onChangeText) {
348
onChangeText(value, index, data);
349
350
- setTimeout(() => this.onClose(value), animationDuration);
351
+ setTimeout(() => this.onClose(value), delay);
352
353
354
onLayout(event) {
0 commit comments