Skip to content

Commit

Permalink
Add keepMounted attribute to dialog to fix preact compatibility problem
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Feb 19, 2020
1 parent 2ee7234 commit dd7ac65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/dialogs/CommonDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ICommonDialogProps } from '../../types/dialogs';
class CommonDialog extends React.PureComponent<ICommonDialogProps, never> {
public render(): React.ReactNode {
return (
<Dialog open={this.props.open}>
<Dialog open={this.props.open} keepMounted={true}>
<DialogTitle>{this.props.title}</DialogTitle>
<DialogContent>
<DialogContentText>{this.props.content}</DialogContentText>
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/LoginDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LoginDialog extends React.PureComponent<ILoginDialogProps, never> {

public render(): React.ReactNode {
return (
<Dialog open={this.props.open}>
<Dialog open={this.props.open} keepMounted={true}>
<DialogTitle>登录网络学堂</DialogTitle>
<DialogContent>
<DialogContentText>
Expand Down

0 comments on commit dd7ac65

Please sign in to comment.