From d1e7fa6b799dd659c03d467616bba8c52e2d16f9 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Thu, 5 Oct 2023 19:18:29 +0530 Subject: [PATCH 1/2] Fixes map type field non readable issues Fixes map type field non readable issues --- .../webapp/src/components/forms/fields/ListField.tsx | 9 +++++++-- .../webapp/src/components/forms/fields/MapField.tsx | 10 ++++++++-- .../webapp/src/components/forms/fields/SetField.tsx | 9 +++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/radlab-ui/webapp/src/components/forms/fields/ListField.tsx b/radlab-ui/webapp/src/components/forms/fields/ListField.tsx index 62abe970..d5288a1b 100644 --- a/radlab-ui/webapp/src/components/forms/fields/ListField.tsx +++ b/radlab-ui/webapp/src/components/forms/fields/ListField.tsx @@ -49,8 +49,13 @@ const ListField: React.FC = ({ variable }) => { return (
{values[variable.name].map((setvalue: string, index: number) => ( -
- {setvalue} +
+ + {setvalue} + remove(index)} className="h-4 w-4 cursor-pointer" diff --git a/radlab-ui/webapp/src/components/forms/fields/MapField.tsx b/radlab-ui/webapp/src/components/forms/fields/MapField.tsx index 2b09e2b0..fe388c5b 100644 --- a/radlab-ui/webapp/src/components/forms/fields/MapField.tsx +++ b/radlab-ui/webapp/src/components/forms/fields/MapField.tsx @@ -73,8 +73,14 @@ const MapField: React.FC = ({ variable, validate }) => {
{Object.keys(values[variable.name]).map( (map_data: string, index: number) => ( -
- +
+ {map_data} = {values[variable.name][map_data]} -
- ), - )} + + +
+ ))}
= ({ variable }) => {
{values[variable.name].map((setvalue: string, index: number) => (