dhroove
1
I created a basis datable with the code below and tried to execute exists() method on the data table id.
But it is always returning false.
In what situation does this method returns true. Suppose if I call destructor() method on this grid then what should this method return ?
webix.ready(function(){
grida = new webix.ui({
container:"testA",
view:"datatable",
id : "sampleTable",
columns:[
{ id:"rank", editor:"text"}
],
editable:true,
autoheight:true,
autowidth:true,
data: [
{ id:1}
]
});
console.log($$("sampleTable").exists());
Viktor
2
Method can be used to check if data item with specified id exists in the component
http://webix.com/snippet/64cf29f5
$$("sampleTable").exists(1) //will return true
$$("sampleTable").exists(2) //will return false, as there is no item with such id
If you need to check the existence of component itself, you can use
if ( $$("sampleTable") ) do_some();
dhroove
3
In the case ( $$(“sampleTable”) ), suppose I call destructor() on the sampleTable. The above code will give true.
How to check if component is destructed or not ?
Viktor
4
After destructor call, the $$ command will return false
http://webix.com/snippet/09bb5b4a