Amarillo
Amarillo

Reputation: 107

How to set focus to the datatable filter?

I'm using a Webix datatable with some filters and want to be able to set the focus to some particular filter input, for instance, after initialization. Unfortunately, I can't find a way to do so.

A minimal required configuration is

{      
  view:"datatable",
  columns:[
    { id:"id"},
    { id:"value",   header:{content:"textFilter"}, fillspace:true}        
  ],
  data:list_data,
  ready:function(){
    alert("datatable loaded")    
  }

}

http://webix.com/snippet/ba52bfc1

But how can I get filter's id or object and set the focus to it?

Upvotes: 2

Views: 1094

Answers (1)

fabien-michel
fabien-michel

Reputation: 2192

ready:function(){
    this.getFilter("value").focus();
}

Updated snippet : http://webix.com/snippet/b4f50020

Upvotes: 3

Related Questions