on 02-15-2018 5:01 PM
I am attempting to set the default filter operator on a smartfilterbar customcontrol:
<smartFilterBar:SmartFilterBar id="gSmartFilterBar" entitySet="Client" persistencyKey="gSmartFilterBar_Explored">
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration key="client_name" label="Client" visibleInAdvancedArea="true"
preventInitialDataFetchInValueHelpDialog="false">
<smartFilterBar:defaultFilterValues>
<smartFilterBar:SelectOption operator="Contains"></smartFilterBar:SelectOption>
</smartFilterBar:defaultFilterValues>
</smartFilterBar:ControlConfiguration></smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>
When a user types in the filter value and hits the 'Go' button, the filter is still passed to the backend as 'EQ'. I can open the field valuehelp/control, and specifically select 'Contains' as the filter operator, and that seems to work. However, I would prefer if the user can type in the query string and hit Go to acheive the same result.
Is the preferred method to use the 'onBeforeRebindTable()' method instead, grabbing the control key value and manually passing a filter with preferred operator? If so, does that negatively interact with the default method in the custom control (passing EQ as the filter operator)?
Thanks in advance!
You need to add custom data to SmartFilterBar. So this is at SmartFilterBar.
<mvc:View controllerName="cis.mm.controller.List" xmlns:mvc="sap.ui.core.mvc" xmlns:sfb="sap.ui.comp.smartfilterbar" xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1">
<sfb:SmartFilterBar id="listFilterBar" app:useContainsAsDefaultFilter="true">
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.