Skip to content

Commit

Permalink
fix: fixed search box not updated after modal dismiss
Browse files Browse the repository at this point in the history
Signed-off-by: SimoneFiorani <[email protected]>
  • Loading branch information
sfiorani committed Jan 17, 2025
1 parent fa37f25 commit 35a8c55
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class SnapshotDownloadModal extends SnapshotGenericModal {
@Override
void show(Long snapshotId, List<String> snapshotConfigs) {

initPidSearch();
initSnapshotScrollPanel();
initSnapshotPidList(snapshotConfigs);
initSelectedPidCounter();
initSnapshotSelectAllAnchor();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*******************************************************************************
* Copyright (c) 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Eurotech
*******************************************************************************/
package org.eclipse.kura.web.client.ui.settings;

import java.util.ArrayList;
Expand Down Expand Up @@ -66,10 +78,6 @@ interface SnapshotGenericModalUiBinder extends UiBinder<Widget, SnapshotGenericM

protected SnapshotGenericModal() {
initWidget(uiBinder.createAndBindUi(this));

initPidSearch();
initSnapshotScrollPanel();

this.noPidSelectedError.setVisible(false);
}

Expand Down Expand Up @@ -148,17 +156,13 @@ public void initSnapshotSelectAllAnchor() {
this.selectOrRemoveAllAnchor.setVisible(true);
}

/*
* Generic private initializers
*/

private void initPidSearch() {
public void initPidSearch() {
this.pidSearch.clear();
this.pidSearch.setVisible(true);
this.pidSearch.addKeyUpHandler(this::onSearchBoxEvent);
}

private void initSnapshotScrollPanel() {
public void initSnapshotScrollPanel() {
this.pidSelectionScrollPanel.setAlwaysShowScrollBars(false);
this.pidSelectionScrollPanel.setHeight("350px");
this.pidSelectionScrollPanel.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
Copyright (c) 2024, 2025 Eurotech and/or its affiliates and others
Copyright (c) 2025 Eurotech and/or its affiliates and others
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others
* Copyright (c) 2011, 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*******************************************************************************
* Copyright (c) 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Eurotech
*******************************************************************************/
package org.eclipse.kura.web.client.ui.wires;

import org.eclipse.kura.web.Console;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2021 Eurotech and/or its affiliates and others
* Copyright (c) 2016, 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<!--
Copyright (c) 2016, 2021 Eurotech and/or its affiliates and others
Copyright (c) 2016, 2025 Eurotech and/or its affiliates and others
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2024 Eurotech and/or its affiliates and others
* Copyright (c) 2017, 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2024 Eurotech and/or its affiliates and others
* Copyright (c) 2018, 2025 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down

0 comments on commit 35a8c55

Please sign in to comment.