From 78bcd4498246d86c154e12cc6a2f7cb5fe80df26 Mon Sep 17 00:00:00 2001 From: vkovtun <viktor.kovtun@id.ethz.ch> Date: Sat, 12 Aug 2023 21:09:16 +0200 Subject: [PATCH] SSDM-13579: Fixed the issue that the input form was cleared when it shouldn't. --- ui-admin/src/js/components/common/dialog/InputDialog.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui-admin/src/js/components/common/dialog/InputDialog.jsx b/ui-admin/src/js/components/common/dialog/InputDialog.jsx index 197d5693ff9..09fa1d5b224 100644 --- a/ui-admin/src/js/components/common/dialog/InputDialog.jsx +++ b/ui-admin/src/js/components/common/dialog/InputDialog.jsx @@ -44,13 +44,18 @@ class InputDialog extends React.Component { const { onConfirm } = this.props const { value } = this.state onConfirm(value) - this.clearInput() + + if (!this.props.inputValue) { + this.clearInput() + } } handleCancelClick() { const { onCancel } = this.props onCancel() - this.clearInput() + if (!this.props.inputValue) { + this.clearInput() + } } clearInput() { -- GitLab