on 2018 Oct 31 9:48 AM
Hi @all,
this is a question from a customer.
When typing something in a filter of the SmartFilterBar the value is automatically marked with filter operator equal. Now customer is asking if its possible to change the filter operator to contains by default.
So in short customer is too lazy to type *xxxx* on himself. He wants this behaviour by default.
I looked a lot in the SapUI5 documentation and could only find how to set a default filter to one filter field. But could not find a solution to change the default filter operator on all filter fields.
Maybe somebody has an idea?
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.
Does this really work? I have tried to implement it and it doesn't do anything. I've seen your answer in other places. Can you confirm this is true? And if there is any missing code for the implementation? Thank you
Hi,
you can use a custom Control in the filter bar and apply the filter by yourself:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.