Skip to content

Commit

Permalink
fix: 填入url,点击确认或取消后,输入框没有清空的bug (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
goodenough227 committed Jan 14, 2024
1 parent 0bb270e commit b74a260
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/webapp/src/component/add-room-dialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class AddRoomDialog extends React.Component<Props> {
this.setState({
visible: false,
confirmLoading: false,
textView:''
});
this.props.refresh();
})
Expand All @@ -45,13 +46,15 @@ class AddRoomDialog extends React.Component<Props> {
this.setState({
visible: false,
confirmLoading: false,
textView:''
});
})
};

handleCancel = () => {
this.setState({
visible: false,
textView:''
});
};

Expand All @@ -62,7 +65,7 @@ class AddRoomDialog extends React.Component<Props> {
}

render() {
const { visible, confirmLoading, ModalText } = this.state;
const { visible, confirmLoading, ModalText,textView } = this.state;
return (
<div>
<Modal
Expand All @@ -72,7 +75,7 @@ class AddRoomDialog extends React.Component<Props> {
confirmLoading={confirmLoading}
onCancel={this.handleCancel}>
<p>{ModalText}</p>
<Input size="large" placeholder="https://" onChange={this.textChange} />
<Input size="large" value={textView} placeholder="https://" onChange={this.textChange} />
</Modal>
</div>
);
Expand Down

0 comments on commit b74a260

Please sign in to comment.