@@ -165,10 +165,15 @@ define([
165
165
var tblContent = $ ( '<td></td>' ) ;
166
166
167
167
168
- let { name, label, component, required } = obj ;
168
+ let { name, label, component, required, output } = obj ;
169
169
let value = state [ name ] ;
170
170
171
- var requiredFontStyle = required == true ? 'vp-orange-text' : '' ;
171
+ var requiredFontStyle = '' ;
172
+ if ( required === true ) {
173
+ requiredFontStyle = 'vp-bold vp-orange-text' ;
174
+ } else if ( output === true ) {
175
+ requiredFontStyle = 'vp-bold' ;
176
+ }
172
177
var lblTag = $ ( `<label class="vp-bold">${ label } </label>` ) . attr ( {
173
178
'for' : name ,
174
179
'class' : requiredFontStyle ,
@@ -823,7 +828,7 @@ define([
823
828
* @param {array/boolean } columnWithIndex boolean array or value to decide whether select tag has index option
824
829
* Usage :
825
830
* $(document).on('change', this.wrapSelector('#dataframe_tag_id'), function() {
826
- * pdGen.vp_bindColumnSource(that, 'dataframe_tag_id', ['column_input_id'], 'select', [true, true, true] );
831
+ * pdGen.vp_bindColumnSource(that, 'dataframe_tag_id', ['column_input_id'], 'select', false, false );
827
832
* });
828
833
*/
829
834
var vp_bindColumnSource = function ( pageThis , targetId , columnInputIdList , tagType = "input" , columnWithEmpty = false , columnWithIndex = false ) {
@@ -915,7 +920,7 @@ define([
915
920
'class' : 'vp-select vp-state'
916
921
} ) ;
917
922
// make tag
918
- list . forEach ( listVar => {
923
+ list . forEach ( ( listVar , idx ) => {
919
924
var option = document . createElement ( 'option' ) ;
920
925
$ ( option ) . attr ( {
921
926
'value' :listVar . value ,
@@ -932,6 +937,7 @@ define([
932
937
$ ( pageThis . wrapSelector ( '#' + columnInputId ) ) . replaceWith ( function ( ) {
933
938
return $ ( tag ) ;
934
939
} ) ;
940
+ $ ( pageThis . wrapSelector ( '#' + columnInputId ) ) . trigger ( 'change' ) ;
935
941
}
936
942
} ) . catch ( function ( err ) {
937
943
vpLog . display ( VP_LOG_TYPE . ERROR , 'com_generator - bindColumnSource error ' , err )
0 commit comments