@vaadin/field-base 23.3.0-beta1 → 23.3.0-rc1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/field-base",
3
- "version": "23.3.0-beta1",
3
+ "version": "23.3.0-rc1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@open-wc/dedupe-mixin": "^1.3.0",
34
34
  "@polymer/polymer": "^3.0.0",
35
- "@vaadin/component-base": "23.3.0-beta1",
35
+ "@vaadin/component-base": "23.3.0-rc1",
36
36
  "lit": "^2.0.0"
37
37
  },
38
38
  "devDependencies": {
@@ -40,5 +40,5 @@
40
40
  "@vaadin/testing-helpers": "^0.3.2",
41
41
  "sinon": "^13.0.2"
42
42
  },
43
- "gitHead": "15fe2078c28a08e658b95d19628265ae6f7a787f"
43
+ "gitHead": "dbe6857fda2fc660f366b22f5336b2aee0093bca"
44
44
  }
@@ -56,4 +56,6 @@ export declare class InputMixinClass {
56
56
  protected _toggleHasValue(hasValue: boolean): void;
57
57
 
58
58
  protected _valueChanged(value?: string, oldValue?: string): void;
59
+
60
+ protected _setHasInputValue(event: InputEvent): void;
59
61
  }
@@ -155,11 +155,7 @@ export const InputMixin = dedupingMixin(
155
155
  * @private
156
156
  */
157
157
  __onInput(event) {
158
- // In the case a custom web component is passed as `inputElement`,
159
- // the actual native input element, on which the event occurred,
160
- // can be inside shadow trees.
161
- const target = event.composedPath()[0];
162
- this._hasInputValue = target.value.length > 0;
158
+ this._setHasInputValue(event);
163
159
  this._onInput(event);
164
160
  }
165
161
 
@@ -230,5 +226,19 @@ export const InputMixin = dedupingMixin(
230
226
  get _hasValue() {
231
227
  return this.value != null && this.value !== '';
232
228
  }
229
+
230
+ /**
231
+ * Sets the `_hasInputValue` property based on the `input` event.
232
+ *
233
+ * @param {InputEvent} event
234
+ * @protected
235
+ */
236
+ _setHasInputValue(event) {
237
+ // In the case a custom web component is passed as `inputElement`,
238
+ // the actual native input element, on which the event occurred,
239
+ // can be inside shadow trees.
240
+ const target = event.composedPath()[0];
241
+ this._hasInputValue = target.value.length > 0;
242
+ }
233
243
  },
234
244
  );