@@ -40,52 +40,7 @@ export const buildTextBox = (field, validate) => {
4040 validate,
4141 resolveProps : ( props , { meta, input } , formOptions ) => {
4242 dynamicFields [ input . name ] = input . value ;
43- } ,
44- // resolveProps: (props, { meta, input }, formOptions) => {
45- // console.log(props);
46- // console.log(meta);
47- // console.log(input);
48- // console.log(formOptions);
49- // if (!formOptions.pristine) {
50- // if (field.dialog_field_responders.length > 0) {
51- // field.dialog_field_responders.forEach((tempField) => {
52- // console.log(tempField);
53- // dynamicFields.forEach((fieldToRefresh) => {
54- // if (fieldToRefresh.field === tempField) {
55- // const refreshData = {
56- // action: 'refresh_dialog_fields',
57- // resource: {
58- // dialog_fields: {
59- // // credential: null,
60- // hosts: 'localhost0',
61- // // param_provider_id: '38',
62- // // param_miq_username: 'admin',
63- // // param_miq_password: 'smartvm',
64- // // check_box_1: 't',
65- // // dropdown_list_1_1: null,
66- // // textarea_box_1: '',
67- // // date_time_control_1: '2022-10-12T20:50:45.180Z',
68- // // date_time_control_2: '2022-10-12T20:50:45.180Z',
69- // // date_control_1: '2022-10-12',
70- // // date_control_2_1: '2022-09-27',
71- // },
72- // fields: ['credential'],
73- // resource_action_id: '2018',
74- // target_id: '14',
75- // target_type: 'service_template',
76- // real_target_type: 'ServiceTemplate',
77- // },
78- // };
79- // fieldToRefresh.values = API.post(`/api/service_dialogs/10`, refreshData).then((data) => {
80- // console.log(data);
81- // });
82- // console.log(fieldToRefresh);
83- // }
84- // });
85- // });
86- // }
87- // }
88- // },
43+ }
8944 } ;
9045 }
9146 return component ;
@@ -336,11 +291,7 @@ const onRefreshField = (response, field, initialData, data, setData, fieldPositi
336291/** Function to build a refresh button near to drop down. */
337292export const buildRefreshButton = ( response , field , initialData , data , setData , fieldPosition ) => ( {
338293 component : 'refresh-button' ,
339- id : `refresh_${ field . id } ` ,
340294 name : `refresh_${ field . name } ` ,
341- label : 'Refresh' ,
342- hideField : ! field . visible ,
343- className : 'refresh-button' ,
344295 showRefreshButton : ! ! ( field . dynamic && field . show_refresh_button ) ,
345296 fieldName : field . name ,
346297 onRefresh : ( ) => onRefreshField ( response , field , initialData , data , setData , fieldPosition ) ,
0 commit comments