@@ -75,7 +75,16 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
7575 const sampleRecordsFinal = useMemo ( ( ) => {
7676 if ( sampleRecords && sampleRecords . calculatedAttributesDisplay ) {
7777 return sampleRecords . calculatedAttributesDisplay . map ( ( record : any , index ) => {
78- const calculatedValue = currentAttributesRef . current . dataType != DataTypeEnum . EMBEDDING_LIST ? record : { id : record . id , value : JSON . parse ( record . value ) }
78+ let calculatedValue ;
79+ if ( currentAttributesRef . current . dataType == DataTypeEnum . EMBEDDING_LIST ) {
80+ calculatedValue = { id : record . id , value : JSON . parse ( record . value ) } ;
81+ }
82+ if ( currentAttributesRef . current . dataType == DataTypeEnum . TEXT_LIST ) {
83+ calculatedValue = { id : record . id , value : JSON . stringify ( record ) } ;
84+ }
85+ else {
86+ calculatedValue = record
87+ }
7988 return {
8089 ...record ,
8190 onClick : viewRecordDetails ( index ) ,
@@ -85,7 +94,6 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
8594 ) ;
8695 }
8796 } , [ sampleRecords ] ) ;
88-
8997 return ( < div >
9098 < div className = "mt-8 text-sm leading-5" >
9199 < div className = "text-gray-700 font-medium mr-2" >
@@ -136,7 +144,7 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
136144 < div key = { record . id } className = "divide-y divide-gray-200 bg-white" >
137145 < div className = "flex-shrink-0 border-b border-gray-200 shadow-sm flex justify-between items-center" >
138146 < div className = "flex items-center text-xs leading-5 text-gray-500 font-normal mx-4 my-3 text-justify" >
139- { String ( record . value ) }
147+ { String ( record ?. calculatedValue ? .value ) }
140148 </ div >
141149 < div className = "flex items-center justify-center mr-5 ml-auto" >
142150 < KernButton
0 commit comments