Can we disable optionData header in tabbar?

edited March 2016 in Technical questions

I have a tabbar with 2 header in options.
In first tab, I have a form view. When I change something in textbox , I want to disable other tab in tabbar. Can we do it?

webix.ui({ 

    rows:[
        {view:"tabbar", id:'tabbar', value:'formView', multiview:true, options: [
            { value: 'Form', id: 'formView'},
            { value: 'Empty', id: 'emptyView'}
        ]},

        {
          cells:[
            {

                id:"formView",
                view:"form",     
                width:300,
                elements:[ 
                    { view:"text", label:"Email"},
                    { view:"text", type:"password", label:"Password"},
                ],

                  elementsConfig: {
                    bottomPadding: 18,
                    on: {                      
                      "onChange": function () {                                             
                      },
                      "onKeyPress": function () {
                        webix.message({type:"error", text:"Want to disable Other Tab"});
                      }
                    }
                  }
            },

             {id:"emptyView", template:"Some content"}

        ]}
    ]
});
Tagged:

Comments

  • Hello,

    Unfortunately, there's no way to disable the particular tab, but you can use the addOption/removeOption API or disable the content of the second tab:

    http://webix.com/snippet/01b14327

  • Thanks for your suggestion. I just want to disable and don't want to remove it. :). I'll find another solution by setting css style.:)

  • edited June 3

    Webix, is this feature in your future roadmap?
    I think is useful you can have a disable tab, that is disabled the tab cell itself.
    Same as binhtieu I will have to do a work around via CSS in order to get this.

  • Hello,

    We would rather not include it into the roadmap. Usually, it is better to hide inactive UI elements in the application rather than to disable. And again, you can always achieve the goal by CSS rules.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!