Tracing: Fix cannot assign to read only property in TagMappingInput (#75070)

* Fix cannot assign to read only property in TagMappingInput

* cloneDeep and updates

* Update assignment

* Updates state change
This commit is contained in:
Joey 2023-09-22 15:03:42 +01:00 committed by GitHub
parent c955eff1cb
commit 4155f0a92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ export const TagMappingInput = ({ values, onChange, id }: Props) => {
onChange( onChange(
values.map((v, i) => { values.map((v, i) => {
if (i === idx) { if (i === idx) {
v.key = String(e); return { ...v, key: String(e) };
} }
return v; return v;
}) })
@ -46,7 +46,7 @@ export const TagMappingInput = ({ values, onChange, id }: Props) => {
onChange( onChange(
values.map((v, i) => { values.map((v, i) => {
if (i === idx) { if (i === idx) {
v.value = String(e); return { ...v, value: String(e) };
} }
return v; return v;
}) })