filter - SAPUI5 - FilterBar - setVisible not working -
i'm using sap.ui.comp.filterbar.filterbar
control on project. works fine, except when try hide control.
var ofilterbar = new sap.ui.comp.filterbar.filterbar("filterbar",{ reset: ocontroller.handleonreset, search: ocontroller.handleonsearch, showrestoreonfb: true, showclearonfb: true, showrestorebutton: true, showclearbutton: true, ... }); ofilterbar.setvisible(false);
i'm getting following error:
uncaught typeerror: ofilterbar.setvisible not function
since property being inherited sap.ui.core.control class, should work , think has nothing versions either (i'm using 1.24).
it has version.
in sapui5 1.28[1] property visible
moved sap.ui.core.control
control extending have property well.
if using earlier version control implement property can made invisible.
you extend control using include property:
sap.ui.comp.filterbar.filterbar.extend("my.filterbar", { metadata: { properties: { visible: { type: "boolean", group: "appearance" } } }, renderer: function (orm, ocontrol) { if (ocontrol.getvisible()) { sap.ui.comp.filterbar.filterbarrenderer.render(orm, ocontrol); } else { // handle invisibility } } });
Comments
Post a Comment