Skip to content

Commit 19ee5be

Browse files
committed
Resolved prop name conflict for base component label
1 parent c1d9b98 commit 19ee5be

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/components/dropdown/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -483,23 +483,23 @@ export default class Dropdown extends PureComponent {
483483
} = this.props;
484484

485485
let index = this.selectedIndex();
486-
let label;
486+
let title;
487487

488488
if (~index) {
489-
label = labelExtractor(data[index], index);
489+
title = labelExtractor(data[index], index);
490490
}
491491

492-
if (null == label) {
493-
label = value;
492+
if (null == title) {
493+
title = value;
494494
}
495495

496496
if ('function' === typeof renderBase) {
497-
return renderBase({ ...props, label, value, renderAccessory });
497+
return renderBase({ ...props, title, value, renderAccessory });
498498
}
499499

500-
let title = null == label || 'string' === typeof label?
501-
label:
502-
String(label);
500+
title = null == title || 'string' === typeof title?
501+
title:
502+
String(title);
503503

504504
return (
505505
<TextField

0 commit comments

Comments
 (0)