pub fn on_input(
    rrc: &mut RootRenderingComponent,
    vdom_weak: dodrio::VdomWeak,
    ctrl_name: String,
    ctrl_value: String,
) {
    logmod::debug_write(&format!("select_on_input{}", ""));
    let field_in_struct =
        fetchjsonformatmod::get_mut_by_name_req(&mut rrc.json_format, ctrl_name.as_str());
    logmod::debug_write(&format!("field_in_struct {:?}", field_in_struct));

    let mut ctrl_value = ctrl_value;

    //mask the date_format
    if field_in_struct.date_format.is_some() {
        ctrl_value = mask_date_format(field_in_struct, &ctrl_value);
    }
    //write to main struct
    field_in_struct.value = ctrl_value.clone();
    //write to result json
    rrc.json_result[ctrl_name.as_str()] = ctrl_value.clone();
    //save to local storage
    let window = unwrapmod::unwrap_option_abort(web_sys::window());
    let ls = unwrapmod::unwrap_option_abort(unwrapmod::unwrap_result_abort(window.local_storage()));
    let _x = ls.set_item(
        "json_string",
        unwrapmod::unwrap_result_abort(serde_json::to_string_pretty(&rrc.json_result)).as_str(),
    );

    vdom_weak.schedule_render();
}
/// event on input for ctrl input and select
event on input for ctrl input and select
event on input for ctrl input and select
pub fn on_input(
    rrc: &mut RootRenderingComponent,
    vdom_weak: dodrio::VdomWeak,
    ctrl_name: String,
    ctrl_value: String,
) {
    logmod::debug_write(&format!("select_on_input{}", ""));
    let field_in_struct =
        fetchjsonformatmod::get_mut_by_name_req(&mut rrc.json_format, ctrl_name.as_str());
    logmod::debug_write(&format!("field_in_struct {:?}", field_in_struct));
    let mut ctrl_value = ctrl_value;
    //mask the date_format
    if field_in_struct.date_format.is_some() {
        ctrl_value = mask_date_format(field_in_struct, &ctrl_value);
    }
    //write to main struct
    field_in_struct.value = ctrl_value.clone();
    //write to result json
    rrc.json_result[ctrl_name.as_str()] = ctrl_value.clone();
    //save to local storage
    let window = unwrapmod::unwrap_option_abort(web_sys::window());
    let ls = unwrapmod::unwrap_option_abort(unwrapmod::unwrap_result_abort(window.local_storage()));
    let _x = ls.set_item(
        "json_string",
        unwrapmod::unwrap_result_abort(serde_json::to_string_pretty(&rrc.json_result)).as_str(),
    );
    vdom_weak.schedule_render();
}
pub fn on_input ( rrc : & mut RootRenderingComponent , vdom_weak : dodrio :: VdomWeak , ctrl_name : String , ctrl_value : String , ) { logmod :: debug_write ( & format ! ( " " " " ) ) ; let field_in_struct = fetchjsonformatmod :: get_mut_by_name_req ( & mut rrc . json_format , ctrl_name . as_str ( ) ) ; logmod :: debug_write ( & format ! ( " " field_in_struct ) ) ; let mut ctrl_value = ctrl_value ; //mask the date_format if field_in_struct . date_format . is_some ( ) { ctrl_value = mask_date_format ( field_in_struct , & ctrl_value ) ; } //write to main struct field_in_struct . value = ctrl_value . clone ( ) ; //write to result json rrc . json_result [ ctrl_name . as_str ( ) ] = ctrl_value . clone ( ) ; //save to local storage let window = unwrapmod :: unwrap_option_abort ( web_sys :: window ( ) ) ; let ls = unwrapmod :: unwrap_option_abort ( unwrapmod :: unwrap_result_abort ( window . local_storage ( ) ) ) ; let _x = ls . set_item ( " " , unwrapmod :: unwrap_result_abort ( serde_json :: to_string_pretty ( & rrc . json_result ) ) . as_str ( ) , ) ; vdom_weak . schedule_render ( ) ; }
event on input for ctrl input and select
event on input for ctrl input and select
rrc
&mut RootRenderingComponent
vdom_weak
dodrio::VdomWeak
ctrl_name
String
ctrl_value
String
rrc
&mut RootRenderingComponent
vdom_weak
dodrio::VdomWeak
ctrl_name
String
ctrl_value
String