Skip to content

Commit 70172b8

Browse files
committed
fix: component should update
1 parent d59b28d commit 70172b8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rmc-dialog",
3-
"version": "0.0.1-alpha.3",
3+
"version": "0.0.1-alpha.4",
44
"description": "mobile dialog ui component for react",
55
"keywords": [
66
"react",

src/DialogWrap.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export default class DialogWrap extends React.Component<IDialogPropTypes, any> {
1919
}
2020
}
2121

22+
shouldComponentUpdate({ visible }) {
23+
return !!(this.props.visible || visible);
24+
}
25+
2226
componentWillUnmount() {
2327
this.renderDialog(false);
2428
}

0 commit comments

Comments
 (0)