Skip to content

Commit 1ba2adf

Browse files
committed
implemented checks for updation only when changes
1 parent 1d1b128 commit 1ba2adf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/user/Admin/Tickets/TicketDiscussion/Discussion/Discussion.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class Discussion extends Component {
128128
<Button
129129
style={{ margin: "8px" }}
130130
onClick={this.handleUpdateTicket}
131+
disabled={this.props.ticket.content === this.state.content}
131132
>
132133
<SaveButton />
133134
Save

src/user/Admin/Tickets/TicketDiscussion/Layout/Title.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ class Title extends Component {
7575
<CancelButton />
7676
Cancel
7777
</Button>
78-
<Button style={{ display: "flex" }}>
78+
<Button
79+
disabled={this.props.ticket.title === this.state.title}
80+
style={{ display: "flex" }}
81+
>
7982
<SaveButton onClick={this.handleSave} />
8083
Save
8184
</Button>

0 commit comments

Comments
 (0)