openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

SmartFilterBar cannot disable basic search

Open alex-ecenta opened this issue 8 years ago • 3 comments

Version: "1.54.7"
We'd like to get rid of the basic search field that is presented with the SmartFilterBar
enableBasicSearch="false" has no effect.

alex-ecenta avatar Aug 06 '18 23:08 alex-ecenta

Hi @alex-ecenta ,

Settings enableBasicSearch to "false" should render the SmartFilterBar without basic search field. But the property must be set in the View, before initialization of the SmartFilterBar. Changing the property after initialization does not have an effect. From the documentation: "Most of the attributes/properties are not dynamic and cannot be changed once the control has been initialized."

Please let us know if this solved the issue. If it didn't, please provide us an example where this issue can be reproduced.

Best regards, Alex

JumpNRun avatar Aug 15 '18 08:08 JumpNRun

@JumpNRun

Can you please clarify, where should we explicitly set the property before the control is rendered? We have the following code:

var oSmartFilterbar = this.getView().byId("smartFilterBar");
oSmartFilterbar.setEnableBasicSearch(false);

In both onInit and onBeforeRebinding.

Is that not the right approach, or not the right place?

alex-ecenta avatar Aug 22 '18 17:08 alex-ecenta

Hi @alex-ecenta

Not before the control is rendered, but before it's initialized. It must be set in the view. The default value for the enableBasicSearch property is false. So it is set to true in the view of your app. Maybe you are also using a smart template?

This is SAPUI5 technology, not OpenUI5. Please understand that we do not provide consultation for SAPUI5 specific topis on this platform, hence i close this issue. If you still think that there is a problem in the framework, at least give us a running example in which the problem can be reproduced.

Thanks and best regards, Alex

JumpNRun avatar Aug 22 '18 19:08 JumpNRun