Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-RC6'
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Jun 20, 2021
2 parents 83cd693 + 5071fe4 commit ae91927
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<a title="Gitter" href="https://gitter.im/DominoKit/domino"><img src="https://badges.gitter.im/Join%20Chat.svg"></a>
[![Development Build Status](https://github.com/DominoKit/domino-ui/actions/workflows/deploy.yaml/badge.svg?branch=development)](https://github.com/DominoKit/domino-ui/actions/workflows/deploy.yaml/badge.svg?branch=development)
![Maven Central](https://img.shields.io/badge/Release-1.0.0--RC4-green)
![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.dominokit/domino-ui/badge.svg)
![Sonatype Nexus (Snapshots)](https://img.shields.io/badge/Snapshot-HEAD--SNAPSHOT-orange)
![GWT3/J2CL compatible](https://img.shields.io/badge/GWT3/J2CL-compatible-brightgreen.svg)

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/mdi-icons-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-tools</artifactId>
<groupId>org.dominokit</groupId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-tools/theme-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-tools</artifactId>
<groupId>org.dominokit</groupId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion domino-ui-webjar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>domino-ui-parent</artifactId>
<groupId>org.dominokit</groupId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion domino-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.dominokit</groupId>
<artifactId>domino-ui-parent</artifactId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
</parent>

<artifactId>domino-ui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,16 @@ public void setArrowIconSupplier(Supplier<BaseIcon<?>> arrowIconSupplier) {
@Override
public S clear() {
unfloatLabel();
getOptions().forEach(selectOption -> selectOption.deselect(true));
doClear();
valuesContainer.setTextContent("");
showPlaceholder();
if (isAutoValidation()) validate();
return (S) this;
}

/** Clear the current selection based on the implementation */
protected abstract void doClear();

/**
* Opens the select dropdown menu
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ public String getStringValue() {

/** {@inheritDoc} */
@Override
public MultiSelect<T> clear() {
protected void doClear() {
selectedOptions.forEach(SelectOption::deselect);
selectedOptions.clear();
return super.clear();
}

/** @return List of Integer indices of all select options */
Expand Down
16 changes: 10 additions & 6 deletions domino-ui/src/main/java/org/dominokit/domino/ui/forms/Select.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static java.util.Objects.nonNull;

import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -133,8 +134,9 @@ public DropDownMenu getOptionsMenu() {
/** {@inheritDoc} */
@Override
public Select<T> select(SelectOption<T> option, boolean silent) {
if (selectedOption != null)
if (!option.isEqualNode(selectedOption.element())) selectedOption.deselect();
if (nonNull(selectedOption) && !option.isEqualNode(selectedOption.element())) {
selectedOption.deselect();
}
floatLabel();
this.selectedOption = option;
option.select();
Expand Down Expand Up @@ -178,9 +180,11 @@ public String getStringValue() {

/** {@inheritDoc} */
@Override
public Select<T> clear() {
this.selectedOption = null;
return super.clear();
protected void doClear() {
if (nonNull(selectedOption)) {
selectedOption.deselect();
selectedOption = null;
}
}

/** @return int index of selected {@link SelectOption} */
Expand All @@ -205,7 +209,7 @@ public HTMLElement element(SelectOption<T> option) {
Icons.ALL
.check()
.styler(style1 -> style1.add(Styles.pull_right).add("select-option-check-mark"));
FlexItem checkMarkFlexItem = FlexItem.create();
FlexItem<HTMLDivElement> checkMarkFlexItem = FlexItem.create();
checkMarkFlexItem.appendChild(checkMark);
option.getOptionLayoutElement().appendChild(checkMarkFlexItem);

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.dominokit</groupId>
<artifactId>domino-ui-parent</artifactId>
<version>1.0.0-RC5</version>
<version>1.0.0-RC6</version>
<packaging>pom</packaging>

<name>domino-ui-parent</name>
Expand Down Expand Up @@ -68,7 +68,7 @@

<properties>
<snapshot.version>HEAD-SNAPSHOT</snapshot.version>
<next.release.version>1.0.0-RC5</next.release.version>
<next.release.version>1.0.0-RC6</next.release.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

Expand Down

0 comments on commit ae91927

Please sign in to comment.