Skip to content

Commit 94f7151

Browse files
committed
fix(Bar): onClick is not triggered
update status should after the onClick validation, not before.
1 parent c69a23a commit 94f7151

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Bar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ class BarComponent extends React.PureComponent<Props> {
120120
this.props.context.triggerBarAction({ type, coordinate, barID: this.id });
121121
}
122122

123-
this.updateStatusIfNeed(type);
124-
this.updateClickStatus(type);
125-
126123
if (this.isActivated && type === BarActionType.DEACTIVATE) {
127124
// touch and click
128125
this.onClick();
129126
}
127+
128+
this.updateStatusIfNeed(type);
129+
this.updateClickStatus(type);
130130
}
131131

132132
private triggerMouseAction(type: BarActionType) {

0 commit comments

Comments
 (0)