Browse Source

REPORT-58655 复用组件的在线搜索需要在筛选条件下搜索

persist/11.0
kuangshuai 3 years ago
parent
commit
2bfdda603c
  1. 5
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java

5
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java

@ -47,14 +47,11 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
private OnlineShareWidget[] sharableWidgetProviders; private OnlineShareWidget[] sharableWidgetProviders;
//缓存一份用于搜索
private final OnlineShareWidget[] sharableWidgetCache;
//主面板和搜索面板的cardLayout //主面板和搜索面板的cardLayout
private CardLayout mainCardLayout; private CardLayout mainCardLayout;
public AbstractOnlineWidgetShowPane(OnlineShareWidget[] sharableWidgetProviders) { public AbstractOnlineWidgetShowPane(OnlineShareWidget[] sharableWidgetProviders) {
this.sharableWidgetCache = sharableWidgetProviders;
this.sharableWidgetProviders = sharableWidgetProviders; this.sharableWidgetProviders = sharableWidgetProviders;
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel contentPane = initContentPane(); JPanel contentPane = initContentPane();
@ -119,7 +116,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
} }
List<OnlineShareWidget> widgets = new ArrayList<>(); List<OnlineShareWidget> widgets = new ArrayList<>();
if (StringUtils.isNotEmpty(text)) { if (StringUtils.isNotEmpty(text)) {
for (OnlineShareWidget provider : sharableWidgetCache) { for (OnlineShareWidget provider : sharableWidgetProviders) {
if (provider.getName().toLowerCase().contains(text)) { if (provider.getName().toLowerCase().contains(text)) {
widgets.add(provider); widgets.add(provider);
} }

Loading…
Cancel
Save