Skip to content

Commit

Permalink
fix: Fixed iso dropdown in Run Once window
Browse files Browse the repository at this point in the history
Signed-off-by: Maria Pak <[email protected]>
  • Loading branch information
Maria Pak authored and Maria Pak committed Dec 11, 2024
1 parent 12f39f9 commit dfcd8f0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9457,7 +9457,7 @@ fieldset[disabled] .btn-primary.active {
top: auto;
}
.open .dropdown-submenu.active > .dropdown-menu {
display: block;
display: grid;
}
.dropdown-kebab-pf.btn-group > .btn:first-child,
.dropdown-kebab-pf .btn-link {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ interface Style extends CssResource {
String label();
String selectedValue();
String button();
String buttonSelected();
}

interface ListItemTemplate extends SafeHtmlTemplates {
Expand Down Expand Up @@ -169,6 +170,7 @@ private Button createButton() {
button.getElement().setAttribute(DATA_TOGGLE, Styles.DROPDOWN);
selectedValue = Document.get().createSpanElement();
selectedValue.addClassName(FILTER_OPTION);
selectedValue.addClassName(style.buttonSelected());
selectedValue.addClassName(Styles.PULL_LEFT); //$NON-NLS-1$
selectedValue.setInnerHTML(NBSP);
return button;
Expand Down Expand Up @@ -387,7 +389,7 @@ public void scrollToSelected() {
if (child instanceof ListModelListBox.ListItem) {
final ListItem item = (ListModelListBox<T>.ListItem) child;
if (item.isSelected()) {
Scheduler.get().scheduleDeferred(() -> item.getElement().scrollIntoView());
Scheduler.get().scheduleDeferred(() -> scrollIntoView(item.getElement()));
}
}
}
Expand Down Expand Up @@ -447,6 +449,10 @@ public void clear() {
getClickHandlers().clear();
getElement().removeAllChildren();
}

private native void scrollIntoView(Element element) /*-{
element.scrollIntoView({block: "nearest", inline: "nearest"});
}-*/;
}

protected class ListItem extends ComplexPanel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@
padding-right: 25px;
}

.buttonSelected {
overflow: hidden;
text-overflow: ellipsis;
}

.fullWidth {
width: 100%!important;
}

.scrollableMenu {
height: auto;
max-height: 130px;
overflow-x: hidden;
width: auto;
overflow-x: auto;
width: 100%;
min-width: 100%;
}

.selected {
background-color: #0099d3!important;
border-color: #0076b7!important;
color: #fff!important;
padding-right: 40px!important;
}

.selectedValue {
Expand All @@ -41,6 +45,7 @@

.liPosition {
position: relative;
width: 100%;
}

.inlineBlock {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
}

.panelStyle {
table-layout: fixed;
background: #e5ecff;
border-top: 2px solid white;
width: 100%;
Expand Down

0 comments on commit dfcd8f0

Please sign in to comment.