2 weeks ago - last edited 2 weeks ago
Hi,
I have an issue with the:
sap.ui.comp.smartfilterbar.SFBMultiInput
The scenario is following:
In a specific scenario I would like to add a new Token to the Multiinput of Smart Table SmartFIlter Bar.
Hence I prepared the following code:
let oFilterBar = this.getView().byId("ZZZ--listReportFilter");
var aFilterItems = oFilterBar.getAllFilterItems();
const _ProductIndex = aFilterItems.findIndex(item => item.mProperties.name === 'Product');
let oEVControl = aFilterItems[_ProductIndex].getControl();
oEVControl.removeAllTokens();
let _newToken = new sap.m.Token({
key: VALUE.toString(),
text: VALUE.toString()
});
oEVControl.addToken(_newToken);
This is my understanding how one should be able to clear the filter and add new Tokens there.
However, the problem is as follows:
1. Tokens are not removed with .removeAllTokens().
2. Adding tokens with .addToken(_newToken) may add it as a value but running the app does not reflect a filter (all records are displayed regardless of the added filter).
3. There is no documentation for sap.ui.comp.smartfilterbar.SFBMultiInput. There is for:
https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smartfilterbar.SmartFilterBar
and for:
https://sapui5.hana.ondemand.com/#/entity/sap.m.MultiInput
I guess that the statement in sap.m.Multiinput is the answer to the problem:
but there are not details presented there.
Thanks for hints.
OK, so apparantly I found a workaround
1. To clear values :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.