wj-elements 0.1.99 → 0.1.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wje-input.js CHANGED
@@ -30,6 +30,8 @@ class Input extends WJElement {
30
30
  this.internals.setFormValue(value);
31
31
  if (this.input)
32
32
  this.input.value = value;
33
+ this.pristine = false;
34
+ this._value = value;
33
35
  }
34
36
  /**
35
37
  * Getter for the value attribute.
@@ -37,7 +39,7 @@ class Input extends WJElement {
37
39
  */
38
40
  get value() {
39
41
  var _a;
40
- return ((_a = this.input) == null ? void 0 : _a.value) || "";
42
+ return ((_a = this.input) == null ? void 0 : _a.value) ?? this._value ?? "";
41
43
  }
42
44
  /**
43
45
  * Getter for the customErrorDisplay attribute.
@@ -147,7 +149,10 @@ class Input extends WJElement {
147
149
  */
148
150
  setupAttributes() {
149
151
  this.isShadowRoot = "open";
150
- this.value = this.defaultValue;
152
+ if (this.pristine) {
153
+ this.value = this.defaultValue;
154
+ this.pristine = false;
155
+ }
151
156
  }
152
157
  /**
153
158
  * Draws the input.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
4
- "version": "0.1.99",
4
+ "version": "0.1.100",
5
5
  "homepage": "https://github.com/lencys/wj-elements",
6
6
  "author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
7
7
  "license": "MIT",