diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java index 62000b2d83..1e5899f46f 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java @@ -130,11 +130,11 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel { this.mainCardLayout.show(mainCenterPane, MAIN_FILTER_TAB_PANE); return; } - List widgets = new ArrayList<>(); + List searchedWidgetList = new ArrayList<>(); if (StringUtils.isNotEmpty(text)) { for (OnlineShareWidget provider : sharableWidgetProviders) { if (provider.getName().toLowerCase().contains(text)) { - widgets.add(provider); + searchedWidgetList.add(provider); } } } @@ -142,7 +142,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel { if (searchResultShowPane != null) { mainCenterPane.remove(searchResultShowPane); } - searchResultShowPane = manualCreateOnlineWidgetSelectPane(sharableWidgetProviders); + searchResultShowPane = manualCreateOnlineWidgetSelectPane(searchedWidgetList.toArray(new OnlineShareWidget[]{})); this.mainCenterPane.add(searchResultShowPane, SEARCH_RESULT_PANE); this.mainCardLayout.show(mainCenterPane, SEARCH_RESULT_PANE); this.validate();