This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch release-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.19 by this push:
new 308307c31 fix(config-ui): existing config value will be missed (#6184)
(#6185)
308307c31 is described below
commit 308307c314312c4bbc6a4e138eaf020b6f966333
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Oct 7 16:23:05 2023 +1300
fix(config-ui): existing config value will be missed (#6184) (#6185)
Co-authored-by: 青湛 <[email protected]>
---
.../src/plugins/register/jira/transformation-fields/remote-link.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
b/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
index 5bf73ff75..2d53e6abc 100644
--- a/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
+++ b/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
@@ -32,7 +32,7 @@ interface Props {
}
export const RemoteLink = ({ transformation, setTransformation }: Props) => {
- const [index, setInedx] = useState(0);
+ const [index, setInedx] = useState<number>();
const [pattern, setPattern] = useState('');
const [error, setError] = useState('');
const [links, setLinks] = useState<Array<{ pattern: string; regex: string
}>>(
@@ -56,7 +56,7 @@ export const RemoteLink = ({ transformation,
setTransformation }: Props) => {
});
if (success) {
- setLinks(links.map((link, i) => (i === index ? res : link)));
+ setLinks(links.map((link, i) => (i === index ? { ...res, pattern } :
link)));
} else {
setError(res?.response?.data?.message ?? '');
}