@greghowe79/the-lib 1.2.5 → 1.2.7

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.
@@ -60,8 +60,8 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
60
60
  }
61
61
  }
62
62
  if (value) value.value = elem.value;
63
- if (onInput$) {
64
- await onInput$();
63
+ if (onInput$ && _.type === "input") {
64
+ await onInput$(_, elem);
65
65
  }
66
66
  if (onValidate$) {
67
67
  const result = await onValidate$(elem.value);
@@ -58,8 +58,8 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
58
58
  }
59
59
  }
60
60
  if (value) value.value = elem.value;
61
- if (onInput$) {
62
- await onInput$();
61
+ if (onInput$ && _.type === "input") {
62
+ await onInput$(_, elem);
63
63
  }
64
64
  if (onValidate$) {
65
65
  const result = await onValidate$(elem.value);
@@ -8,7 +8,7 @@ export interface InputProps {
8
8
  value?: Signal<string>;
9
9
  error?: Signal<string | null>;
10
10
  onValidate$?: QRL<(value: string) => Promise<string>>;
11
- onInput$?: QRL<() => void>;
11
+ onInput$?: QRL<() => void> | QRL<(event: InputEvent, el: HTMLInputElement) => void>;
12
12
  bgLight?: boolean;
13
13
  currentFile?: Signal<any>;
14
14
  selectedFile?: Signal<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",