Skip to content

Commit 45ef66e

Browse files
authored
Merge pull request #34 from SwapnilTechVariable/bug/cancel-edit-mode
minor issue fix
2 parents d4532d3 + fdd2f11 commit 45ef66e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/editorPage/edit-table-modal/edit-table-modal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class TableSearchModal {
4242
}
4343

4444
copyToClipboard() {
45+
state.queryMode = 'read';
4546
navigator.clipboard.writeText(`${this.query}
4647
4748
// please move the parameters to the parameters section
@@ -56,6 +57,10 @@ ${this.parameters}`);
5657
timer: 1500,
5758
});
5859
}
60+
cancelEdit() {
61+
state.queryMode = 'read';
62+
this.toggleModalState();
63+
}
5964

6065
render() {
6166
return (
@@ -93,7 +98,7 @@ ${this.parameters}`);
9398
</button>
9499
<button
95100
type="button"
96-
onClick={() => this.toggleModalState()}
101+
onClick={() => this.cancelEdit()}
97102
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
98103
>
99104
Cancel

0 commit comments

Comments
 (0)