@@ -298,15 +324,15 @@ export const HTTPClientView = ({model, index}) => {
{/* Headers Tab Content */}
diff --git a/TestMasterUI/src/components/shared/EditableInput.jsx b/TestMasterUI/src/components/shared/EditableInput.jsx
index 37c36d9..29ade5e 100644
--- a/TestMasterUI/src/components/shared/EditableInput.jsx
+++ b/TestMasterUI/src/components/shared/EditableInput.jsx
@@ -106,10 +106,18 @@ const EditableInput = ({
return parts;
};
+ // useEffect(() => {
+ // if (value !== internalValue) {
+ // setInternalValue(value);
+ // }
+ // }, [value]);
+
const handleInput = (e) => {
+ console.log('handleInput', e);
const newValue = e.target.textContent;
const newSelection = saveSelection();
+ console.log(newValue);
setInternalValue(newValue);
setSelection(newSelection);
onChange(newValue);
diff --git a/TestMasterUI/src/components/shared/PropertyTable.jsx b/TestMasterUI/src/components/shared/PropertyTable.jsx
index dcc75b3..a3c1b99 100644
--- a/TestMasterUI/src/components/shared/PropertyTable.jsx
+++ b/TestMasterUI/src/components/shared/PropertyTable.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, {useEffect, useState} from 'react';
import {
Table,
TableBody,
@@ -20,6 +20,10 @@ const PropertyTable = ({
}) => {
const [localProperties, setLocalProperties] = useState(properties);
+ useEffect(() => {
+ setLocalProperties(properties);
+ }, [properties]);
+
// Handle property changes without causing infinite loops
const handlePropertyChange = (index, field, value) => {
const updatedProperties = localProperties.map((prop, i) => {
@@ -29,7 +33,9 @@ const PropertyTable = ({
return prop;
});
setLocalProperties(updatedProperties);
- onChange?.(updatedProperties);
+ requestAnimationFrame(() => {
+ onChange?.(updatedProperties);
+ });
};
// Add new property
@@ -62,8 +68,8 @@ const PropertyTable = ({
Enable
- Key
- Value
+ Key
+ Value