aboutsummaryrefslogtreecommitdiffstats
path: root/webui
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-30 21:46:39 +0200
committerSascha <GlancingMind@outlook.com>2021-04-08 11:27:41 +0200
commit3d5ac70f0a1afa5a77ba1f9e2b23819fb07d5ad1 (patch)
tree53f66a64356e52f0dd37b1fe06291c54b4d86ab4 /webui
parent5c897f4ffb0a1cadc4074e7f3b6a471898c5e48c (diff)
downloadgit-bug-3d5ac70f0a1afa5a77ba1f9e2b23819fb07d5ad1.tar.gz
Only set bugtitle if title is diffrent
Diffstat (limited to 'webui')
-rw-r--r--webui/src/components/BugTitleForm/BugTitleForm.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx
index a7d5a820..bb4d2aa2 100644
--- a/webui/src/components/BugTitleForm/BugTitleForm.tsx
+++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx
@@ -78,6 +78,10 @@ function BugTitleForm({ bug }: Props) {
function submitNewTitle() {
if (!isFormValid()) return;
+ if (bug.title === issueTitleInput.value) {
+ cancelChange();
+ return;
+ }
setTitle({
variables: {
input: {
@@ -106,7 +110,7 @@ function BugTitleForm({ bug }: Props) {
function editableBugTitle() {
return (
- <form className={classes.headerTitle} onSubmit={submitNewTitle}>
+ <form className={classes.headerTitle}>
<BugTitleInput
inputRef={(node) => {
issueTitleInput = node;
@@ -123,7 +127,7 @@ function BugTitleForm({ bug }: Props) {
className={classes.saveButton}
size="small"
variant="contained"
- type="submit"
+ onClick={() => submitNewTitle()}
disabled={issueTitle.length === 0}
>
Save