@@ -118,24 +118,26 @@ const DataCatalog = (/** @type Properties */ props) => {
118118 } ;
119119 TAG_KEYS . forEach ( key => tables [ table_id ] [ key ] = item [ `table_${ key } ` ] ) ;
120120 }
121- const prefixIcons = [ ] ;
122- if ( item . critical_data_element ?? item . table_critical_data_element ) {
123- prefixIcons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-purple' } , 'star' ) , { text : 'Critical data element' , position : 'right' } ) ) ;
124- }
125- if ( item . excluded_data_element ) {
126- prefixIcons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-brown' } , 'visibility_off' ) , { text : 'Excluded data element' , position : 'right' } ) ) ;
127- }
128- if ( item . pii_flag ) {
129- prefixIcons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-orange' } , 'shield_person' ) , { text : 'PII data' , position : 'right' } ) ) ;
130- }
131121 const columnNode = {
132122 id : column_id ,
133123 label : column_name ,
134124 classes : `column ${ drop_date ? 'text-disabled' : ( add_date && ( Date . now ( ) - new Date ( add_date * 1000 ) . getTime ( ) ) < 7 * 86400000 ) ? 'text-bold' : '' } ` ,
135125 ...getColumnIcon ( item ) ,
136126 iconClass : value_ct === 0 ? 'text-error' : null ,
137127 iconTooltip : value_ct === 0 ? 'No non-null values detected' : null ,
138- prefix : span ( { class : 'tg-dh--column-prefix' } , ...prefixIcons ) ,
128+ prefix : ( ) => {
129+ const icons = [ ] ;
130+ if ( item . critical_data_element ?? item . table_critical_data_element ) {
131+ icons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-purple' } , 'star' ) , { text : 'Critical data element' , position : 'right' } ) ) ;
132+ }
133+ if ( item . excluded_data_element ) {
134+ icons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-brown' } , 'visibility_off' ) , { text : 'Excluded data element' , position : 'right' } ) ) ;
135+ }
136+ if ( item . pii_flag ) {
137+ icons . push ( withTooltip ( Icon ( { size : 15 , classes : 'text-orange' } , 'shield_person' ) , { text : 'PII data' , position : 'right' } ) ) ;
138+ }
139+ return span ( { class : 'tg-dh--column-prefix' } , ...icons ) ;
140+ } ,
139141 criticalDataElement : ! ! ( item . critical_data_element ?? item . table_critical_data_element ) ,
140142 excludedDataElement : ! ! item . excluded_data_element ,
141143 piiFlag : ! ! item . pii_flag ,
0 commit comments