@@ -45,7 +45,7 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
4545 setRequestedSomething ( false ) ;
4646 props . setEnabledButton ( false ) ;
4747 setRunOn10HasError ( sampleRecordsFinal . calculatedAttributes . length > 0 ? false : true ) ;
48- if ( currentAttributesRef . current . dataType == DataTypeEnum . EMBEDDING_LIST ) {
48+ if ( currentAttributesRef . current . dataType == DataTypeEnum . EMBEDDING_LIST || currentAttributesRef . current . dataType == DataTypeEnum . TEXT_LIST ) {
4949 sampleRecordsFinal . calculatedAttributesList = sampleRecordsFinal . calculatedAttributes . map ( ( record : string ) => JSON . parse ( record ) ) ;
5050 sampleRecordsFinal . calculatedAttributesListDisplay = extendArrayElementsByUniqueId ( sampleRecordsFinal . calculatedAttributesList ) ;
5151 }
@@ -76,12 +76,9 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
7676 if ( sampleRecords && sampleRecords . calculatedAttributesDisplay ) {
7777 return sampleRecords . calculatedAttributesDisplay . map ( ( record : any , index ) => {
7878 let calculatedValue ;
79- if ( currentAttributesRef . current . dataType == DataTypeEnum . EMBEDDING_LIST ) {
79+ if ( currentAttributesRef . current . dataType == DataTypeEnum . EMBEDDING_LIST || currentAttributesRef . current . dataType == DataTypeEnum . TEXT_LIST ) {
8080 calculatedValue = { id : record . id , value : JSON . parse ( record . value ) } ;
8181 }
82- if ( currentAttributesRef . current . dataType == DataTypeEnum . TEXT_LIST ) {
83- calculatedValue = { id : record . id , value : JSON . stringify ( record ) } ;
84- }
8582 else {
8683 calculatedValue = record
8784 }
@@ -144,7 +141,7 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
144141 < div key = { record . id } className = "divide-y divide-gray-200 bg-white" >
145142 < div className = "flex-shrink-0 border-b border-gray-200 shadow-sm flex justify-between items-center" >
146143 < div className = "flex items-center text-xs leading-5 text-gray-500 font-normal mx-4 my-3 text-justify" >
147- { String ( record ?. calculatedValue ?. value ) }
144+ { Array . isArray ( record ?. calculatedValue ?. value ) ? JSON . stringify ( record ?. calculatedValue ?. value ) : String ( record ?. calculatedValue ?. value ) }
148145 </ div >
149146 < div className = "flex items-center justify-center mr-5 ml-auto" >
150147 < KernButton
0 commit comments