GWT Material。在 table header 中添加内联搜索

GWT Material. Add InlineSearch in table header

如何添加这个搜索图标

<m:MaterialLink iconType="SEARCH" ui:field="openSearch" iconColor="BLACK" float="RIGHT"/>

和这个内联搜索

<incubator:search.ExpandableInlineSearch ui:field="txtSearch" theme="LIGHT" width="50%" placeholder="Search" display="INLINE"/>

在 header 中 material table?

<mt:MaterialDataTable addStyleNames="{style.text-wrap}" ui:field="table"
                                           height="calc(100vh - 151px)"
                                           useStickyHeader="false"
                                           useCategories="false"
                                           useRowExpansion="false"
                                           selectionType="NONE"/>

是啊,终于!那太简单了。

你应该使用这个:

@UiField
MaterialDataTable<MailNotificationDTO> table;

Panel panel = table.getScaffolding().getToolPanel();
panel.add(new MaterialIcon(IconType.SEARCH));'

内联搜索也是如此