Sapui5 如何在filterbar中显示filterGroupItems?

Sapui5 如何在filterbar中显示filterGroupItems?,sapui5,Sapui5,我有以下过滤器: <mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="ch.example.northwind.controller.Customers" xmlns:fb="sap.ui.comp.filterbar" xmlns:html="http://www.w3.org/1999/xhtml"> <Page title=

我有以下过滤器:

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="ch.example.northwind.controller.Customers"
    xmlns:fb="sap.ui.comp.filterbar" xmlns:html="http://www.w3.org/1999/xhtml">
    <Page title="{i18n>title}" showNavButton="true" navButtonPress="onNavPressBack">
        <content>
            <fb:FilterBar reset="onReset" search="onSearch" showRestoreButton="true" showClearButton="true" showGoOnFB="false">
                <fb:filterGroupItems>
                    <fb:FilterGroupItem groupName="G1" groupTitle="Group1" name="A" label="Company" labelTooltip="Tooltip GroupItem Example">
                        <fb:control>
                            <Input type="Text"/>
                        </fb:control>
                    </fb:FilterGroupItem>
                    <fb:FilterGroupItem groupName="G1" groupTitle="Group1" name="B" label="Customer">
                        <fb:control>
                            <Input type="Text"/>
                        </fb:control>
                    </fb:FilterGroupItem>
                    <fb:FilterGroupItem groupName="G2" groupTitle="Group2" name="A2" label="Supplier" labelTooltip="Tooltip GroupItem Example">
                        <fb:control>
                            <Input type="Text"/>
                        </fb:control>
                    </fb:FilterGroupItem>
                    <fb:FilterGroupItem groupName="G2" groupTitle="Group2" name="B2" label="Category">
                        <fb:control>
                            <Input type="Text"/>
                        </fb:control>
                    </fb:FilterGroupItem>
                </fb:filterGroupItems>
            </fb:FilterBar>
        </content>
    </Page>
</mvc:View>  

它看起来像:

如何使
FilterGroupItem G1在栏上可见?
正如你在吧台上看到的,上面写着:

要在此处显示过滤器,请将其添加到过滤器中的过滤器栏


这是什么意思?我找不到筛选器属性。

如果单击筛选器,则筛选器将在那里,但它们不会显示为默认值

要使它们在代码中默认可见,可以将FilterGroupItem的属性visibleInFilterBar设置为true。例如:

<fb:FilterGroupItem visibleInFilterBar="true" groupName="G1" groupTitle="Group1" name="A" label="Company" labelTooltip="Tooltip GroupItem Example">
    <fb:control>
         <Input type="Text"/>
    </fb:control>
</fb:FilterGroupItem>

说明
要在此处显示过滤器,请将它们添加到过滤器中的过滤器栏中
,说明在应用程序中的用法。在您的屏幕截图中,右侧有“过滤器”按钮。这就是所谓的“过滤器”。如果你点击这个,你将能够看到你所有的过滤器。如果选中该复选框,它们将显示在过滤器栏中。它们只是没有作为默认值添加