@@ -175,7 +175,8 @@ define([
175175 ...x ,
176176 value : x . label ,
177177 code : x . value ,
178- type : x . dtype
178+ type : x . dtype ,
179+ isNumeric : x . is_numeric
179180 } ;
180181 } ) ;
181182 callback ( colList ) ;
@@ -193,7 +194,8 @@ define([
193194 ...x ,
194195 value : x . label ,
195196 code : x . value ,
196- type : x . dtype
197+ type : x . dtype ,
198+ isNumeric : x . is_numeric
197199 } ;
198200 } ) ;
199201 callback ( list ) ;
@@ -340,6 +342,7 @@ define([
340342 }
341343
342344 renderSelectionBox ( dataList ) {
345+ let mode = this . mode ;
343346 var tag = new com_String ( ) ;
344347 tag . appendFormatLine ( '<div class="{0} {1} {2} {3}">' , APP_SELECT_BOX , 'left' , APP_DROPPABLE , 'no-selection vp-scrollbar' ) ;
345348 // get data and make draggable items
@@ -351,9 +354,17 @@ define([
351354 } else {
352355 info = '' ;
353356 }
357+ let iconStr = '' ;
358+ if ( mode === 'columns' ) {
359+ if ( data . isNumeric === true ) {
360+ iconStr = '<span class="vp-icon-numeric mr5 vp-vertical-text"></span>' ;
361+ } else {
362+ iconStr = '<span class="vp-icon-non-numeric mr5 vp-vertical-text"></span>' ;
363+ }
364+ }
354365 // render item box
355- tag . appendFormatLine ( '<div class="{0} {1}" data-idx="{2}" data-name="{3}" data-type="{4}" data-code="{5}" title="{6}"><span>{7 }</span></div>'
356- , APP_SELECT_ITEM , APP_DRAGGABLE , data . location , data . value , data . type , data . code , info , data . value ) ;
366+ tag . appendFormatLine ( '<div class="{0} {1}" data-idx="{2}" data-name="{3}" data-type="{4}" data-code="{5}" title="{6}">{7} <span>{8 }</span></div>'
367+ , APP_SELECT_ITEM , APP_DRAGGABLE , data . location , data . value , data . type , data . code , info , iconStr , data . value ) ;
357368 } ) ;
358369 tag . appendLine ( '</div>' ) ; // APP_SELECT_BOX
359370 return tag . toString ( ) ;
@@ -371,9 +382,17 @@ define([
371382 } else {
372383 info = '' ;
373384 }
385+ let iconStr = '' ;
386+ if ( mode === 'columns' ) {
387+ if ( data . isNumeric === true ) {
388+ iconStr = '<span class="vp-icon-numeric mr5 vp-vertical-text"></span>' ;
389+ } else {
390+ iconStr = '<span class="vp-icon-non-numeric mr5 vp-vertical-text"></span>' ;
391+ }
392+ }
374393 // render item box
375- tag . appendFormatLine ( '<div class="{0} {1} {2}" data-idx="{3}" data-name="{4}" data-type="{5}" data-code="{6}" title="{7}"><span>{8 }</span></div>'
376- , APP_SELECT_ITEM , APP_DRAGGABLE , 'added' , data . location , data . value , data . type , data . code , info , data . value ) ;
394+ tag . appendFormatLine ( '<div class="{0} {1} {2}" data-idx="{3}" data-name="{4}" data-type="{5}" data-code="{6}" title="{7}">{8} <span>{9 }</span></div>'
395+ , APP_SELECT_ITEM , APP_DRAGGABLE , 'added' , data . location , data . value , data . type , data . code , info , iconStr , data . value ) ;
377396 } ) ;
378397 tag . appendLine ( '</div>' ) ; // APP_SELECT_BOX
379398 return tag . toString ( ) ;
0 commit comments