isVisible?

It appears that the function ‘isVisible’ will always return true if no parameters are passed to it. The documentation indicates that no parameters are needed but the code appears to be requiring the ‘base_id’ parameter. (starting at line: 4304)

isVisible:function(base_id, prev_id){
if (this._settings.hidden && base_id){
if (!this._hidden_render) {
this._hidden_render = [];
this._hidden_hash = {};
}
if (!this._hidden_hash[base_id]){
this._hidden_hash[base_id] = true;
this._hidden_render.push(base_id);
}
return false;
}
var parent = this.getParent();
if (parent) return parent.isVisible(base_id, this._settings.id);

return true;
},

One idea to consider is to add a line to check if ‘base_id’ is defined, if not use the current component’s id. Something like this:

if (!base_id) { base_id = this._settings.id } 

Then when the ‘isVisible()’ function is called it will return the proper response without passing a parameter. And the routine also still works properly for the internal calls.

Thanks,
Kris

Kris,

we will include the modification in the next version and the is going to be like so:

isVisible: function(base_id, prev_id){ if (this._settings.hidden){ if(base_id){ if (!this._hidden_render) { this._hidden_render = []; this._hidden_hash = {}; } if (!this._hidden_hash[base_id]){ this._hidden_hash[base_id] = true; this._hidden_render.push(base_id); } } return false; } var parent = this.getParent(); if (parent) return parent.isVisible(base_id, this._settings.id); return true; },

Thank you for the solution!

That is a much cleaner solution. Thank you for the code. :slight_smile:

Thanks,
Kris