cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to add custom filter field with ValueHelp to Fiori Elements Filterbar

Tim990
Newcomer
703

Hello,

I tried to add a custom filter field to a ListReportPage filterbar. I want to have a multi input field with a value help dialog in it.  

Tim990_0-1737628314541.png

 

    <mdc:Field
        id="AirportFromTo"
        core:require="{handler: 'com/advades/flight/ext/fragment/AirportFromTo'}"
        value="{path: 'filterValues>', type: 'sap.fe.macros.filter.type.Value', formatOptions: { operator: 'com.advades.flight.ext.fragment.AirportFromTo.filterItems' }}"
    />
sap.ui.define(["sap/ui/model/Filter", "sap/ui/model/FilterOperator"], function (Filter, FilterOperator) {
    "use strict";
    return {
        filterItems: function (sValue) {
            debugger;
            return new Filter({
                filters: [
                    new Filter({ path: "AirportFromId", operator: FilterOperator.EQ, value1: sValue }),
                    new Filter({ path: "AirportToId", operator: FilterOperator.EQ, value1: sValue })
                ],
                and: false
            });
        }
    };
});

 

The filtering is working like expected but the value help is missing. 

I tried it also with a macros:Field but it didnt work. 

In my opinion there should be a easy way to add in custom filter without building the value help dialog by myself.

 

Accepted Solutions (0)

Answers (0)