FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bump Elemento to 1.2.2 · patternfly-java/patternfly-java@2cdef37 · GitHub

Commit 2cdef37

Browse files
committed
Bump Elemento to 1.2.2
1 parent 938b6e7 commit 2cdef37

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Upgrades
10+
11+
- Bump Elemento to 1.2.2
12+
913
## [0.0.2] - 2023-10-10
1014

1115
### Added

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<!-- Dependency versions -->
8585
<version.checkstyle.config>1.0.8.Final</version.checkstyle.config>
8686
<version.elemental2>1.2.1</version.elemental2>
87-
<version.elemento>1.2.1</version.elemento>
87+
<version.elemento>1.2.2</version.elemento>
8888
<version.gwt.event>1.0.0-RC1</version.gwt.event>
8989
<version.gwt.safehtml>1.0.0-RC1</version.gwt.safehtml>
9090
<version.junit>5.10.0</version.junit>

‎src/main/java/org/patternfly/component/button/Button.java‎

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
import elemental2.dom.HTMLAnchorElement;
3838
import elemental2.dom.HTMLButtonElement;
3939
import elemental2.dom.HTMLElement;
40-
import elemental2.dom.Node;
41-
import elemental2.dom.NodeList;
4240

4341
import static elemental2.dom.DomGlobal.console;
4442
import static org.jboss.elemento.Elements.failSafeRemoveFromParent;
@@ -69,12 +67,13 @@
6967
import static org.patternfly.layout.Size.md;
7068

7169
/**
72-
* A button is a box area or text that communicates and triggers user actions when clicked or selected. Buttons can be used to
73-
* communicate and immediately trigger actions a user can take in an application, like submitting a form, canceling a process,
74-
* or creating a new object. Buttons can also be used to take a user to a new location, like another page inside a web
75-
* application, or an external site such as help or documentation.
70+
* A button is a box area or text that communicates and triggers user actions when clicked or selected. Buttons can be
71+
* used to communicate and immediately trigger actions a user can take in an application, like submitting a form,
72+
* canceling a process, or creating a new object. Buttons can also be used to take a user to a new location, like
73+
* another page inside a web application, or an external site such as help or documentation.
7674
*
77-
* @see <a href= "https://www.patternfly.org/components/button/html">https://www.patternfly.org/components/button/html</a>
75+
* @see <a href=
76+
* "https://www.patternfly.org/components/button/html">https://www.patternfly.org/components/button/html</a>
7877
*/
7978
public class Button extends BaseComponent<HTMLElement, Button>
8079
implements Disabled<HTMLElement, Button>, Inline<HTMLElement, Button>, Plain<HTMLElement, Button>,
@@ -278,24 +277,13 @@ public Button onAction(ActionHandler<Button> actionHandler) {
278277
// ------------------------------------------------------ public API
279278

280279
/**
281-
* Changes the text of this button. Prefer this method over {@link #textContent(String)}, since this method doesn't remove a
282-
* possible progress spinner.
280+
* Changes the text of this button. Prefer this method over
281+
* {@link org.jboss.elemento.HasElement#textContent(String)}, since this method doesn't remove a possible progress
282+
* spinner.
283283
*/
284284
public Button text(String text) {
285285
// just using textContent(text) would remove a possible progress spinner
286-
boolean textNode = false;
287-
NodeList<Node> nodes = element().childNodes;
288-
for (int i = 0; i < nodes.length && !textNode; i++) {
289-
Node node = nodes.getAt(i);
290-
if (node.nodeType == Node.TEXT_NODE) {
291-
node.nodeValue = text;
292-
textNode = true;
293-
}
294-
}
295-
if (!textNode) {
296-
add(text);
297-
}
298-
return this;
286+
return textNode(text);
299287
}
300288

301289
public Button href(String href) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL