change menu item value at runtime

Hi, suppose we have the following menu, how can I change the value of an item causing by some event? for example when I click item 4 itself?
I can get the value by : this.getMenuItem(id).value, but how can I change it? the refresh() method is not working.
Thanks

        {view:"menu", id:"this_menu_id", autowidth: true,               
            data:[                
                {id:"sub_menu_id", value: "webix" , submenu:[
                    {id: "1", value: "webix one"},
                    {id: "2", value: "webix two"},
                    {id: "3", value: "webix three"},
                    {id: "4", value: "this value"}
                    
                ]}
            ],
            on:{
                onMenuItemClick:function(id){
                    switch(id){
                        case '1':
                            //do something
                            break;
                        case '2':
                            //do something
                            break;
                        case '3':
                            //do something
                            break;
                        case '4':
                            //change value from "this value" to "other value"
                            break;
                    }
                    
                }
            }
        }

I implemented this solution and it works. thanks

case '4':
    red_green = !red_green;
    if(red_green)
        $$('$submenu1').config.data[3].value = "<span style='color:green' class='webix_icon fa-check'></span> Active green";
    else
        $$('$submenu1').config.data[3].value = "<span style='color:red' class='webix_icon fa-check'></span> Active red";
    $$('$submenu1').refresh();   

There’s also a possibility to do this withoutswitch andrefresh, using the conjunction of getMenu and updateItem methods:

if(red_green)
        this.getMenu(id).updateItem(id, {value:"one value"});
    else
        this.getMenu(id).updateItem(id, {value:"another one"});

O yes, this is better and more elegant.
I really appreciate your help.
Regards