Added type checks

This commit is contained in:
vpopescu
2022-09-22 15:36:17 +02:00
parent 6219c206e9
commit 2cdba6f42a
2 changed files with 81 additions and 72 deletions

View File

@@ -58,6 +58,7 @@ const DynamicTable = (props) => {
}; };
const renderKeyRows = () => { const renderKeyRows = () => {
if (propkeys){
return propkeys.map(function (o, i) { return propkeys.map(function (o, i) {
return ( return (
<tr key={"item-" + i}> <tr key={"item-" + i}>
@@ -85,7 +86,9 @@ const DynamicTable = (props) => {
); );
}); });
}; };
};
const renderValueRows = () => { const renderValueRows = () => {
if (propvalues){
return propvalues.map(function (o, i) { return propvalues.map(function (o, i) {
//console.log("ValRows" +i) //console.log("ValRows" +i)
//console.log("ValRows" +o) //console.log("ValRows" +o)
@@ -108,7 +111,9 @@ const DynamicTable = (props) => {
); );
}); });
}; };
};
const renderDelete = () => { const renderDelete = () => {
if (propvalues){
return propvalues.map(function (o, i) { return propvalues.map(function (o, i) {
return ( return (
<tr key={"item-" + i}> <tr key={"item-" + i}>
@@ -135,6 +140,7 @@ const DynamicTable = (props) => {
); );
}); });
}; };
};
return ( return (
<div> <div>

View File

@@ -91,6 +91,9 @@ const GroupEdit = (props) => {
<DynamicTable <DynamicTable
current_propobject={group_data.properties} current_propobject={group_data.properties}
setProp={setProp} setProp={setProp}
setPropKeys={setPropKeys}
setPropValues={setPropValues}
//Add keys //Add keys
/> />
</div> </div>