Skip to content

Commit f245199

Browse files
authored
fix RTL bug (#1446)
1 parent 78347bc commit f245199

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/drawer/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ class Drawer extends PureComponent<Props> {
156156
constructor(props: DrawerProps) {
157157
super(props);
158158

159-
this.leftRender = props.leftItem ? (Constants.isRTL ? this.renderRightActions : this.renderLeftActions) : undefined;
160-
this.rightRender = props.rightItems
161-
? Constants.isRTL
162-
? this.renderLeftActions
163-
: this.renderRightActions
164-
: undefined;
159+
this.leftRender = Constants.isRTL
160+
? props.rightItems && this.renderRightActions
161+
: props.leftItem && this.renderLeftActions;
162+
this.rightRender = Constants.isRTL
163+
? props.leftItem && this.renderLeftActions
164+
: props.rightItems && this.renderRightActions;
165165
}
166166

167167
private getLeftActionsContainerStyle = memoize((leftItem, rightItems) => {

0 commit comments

Comments
 (0)