Skip to content

Commit

Permalink
GH-262 - fix issue gui unresponsive when adding a todo
Browse files Browse the repository at this point in the history
  • Loading branch information
pvev committed Nov 10, 2024
1 parent f25dc91 commit 8892ad4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webapp/src/components/add_issue/add_issue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ export default class AddIssue extends React.PureComponent {
attachToThread: false,
previewMarkdown: false,
assigneeModal: false,
isTyping: false,
};
}

static getDerivedStateFromProps(props, state) {
if (state.isTyping) {
return null;
}
if (props.visible && (props.message !== state.message || props.postPermalink !== state.postPermalink)) {
return {
message: props.message,
Expand Down Expand Up @@ -88,6 +92,7 @@ export default class AddIssue extends React.PureComponent {
message: '',
description: '',
postPermalink: '',
isTyping: false,
});

if (attachToThread) {
Expand Down Expand Up @@ -123,6 +128,7 @@ export default class AddIssue extends React.PureComponent {
handleInputChange = (e, field) => {
this.setState({
[field]: e.target.value,
isTyping: true,
});
}

Expand Down

0 comments on commit 8892ad4

Please sign in to comment.