Skip to content

Commit fcad346

Browse files
committed
Fixed textAlign for dropdown items
1 parent 6b1b7df commit fcad346

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/dropdown/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,6 @@ export default class Dropdown extends PureComponent {
493493
},
494494
};
495495

496-
let textAlign = I18nManager.isRTL?
497-
'left':
498-
'right';
499-
500496
return data
501497
.map((item, index) => {
502498
if (null == item) {
@@ -516,11 +512,11 @@ export default class Dropdown extends PureComponent {
516512
itemColor:
517513
selectedItemColor;
518514

519-
let style = { color, fontSize, textAlign };
515+
let style = { color, fontSize };
520516

521517
return (
522518
<DropdownItem index={index} key={index} {...props}>
523-
<Text style={[itemTextStyle, style]} numberOfLines={1}>
519+
<Text style={[styles.item, itemTextStyle, style]} numberOfLines={1}>
524520
{title}
525521
</Text>
526522
</DropdownItem>

src/components/dropdown/styles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export default StyleSheet.create({
4747
}),
4848
},
4949

50+
item: {
51+
textAlign: 'left',
52+
},
53+
5054
scroll: {
5155
flex: 1,
5256
borderRadius: 2,

0 commit comments

Comments
 (0)