@djcali570/component-lib 0.1.103 → 0.1.104

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Svelte Component library
2
2
 
3
- 0.1.103
3
+ 0.1.104
4
4
 
5
5
  - Updated Input to trigger onUpdate when cleared.
6
6
 
@@ -65,6 +65,7 @@
65
65
  let keydownHandler: (e: Event) => void = $state(() => {});
66
66
  let inputHandler: (e: Event) => void = $state(() => {});
67
67
  let lastValue: string | undefined = $state(undefined);
68
+ let initialized = $state(false);
68
69
 
69
70
  /**
70
71
  * Regex Validators
@@ -90,6 +91,14 @@
90
91
  $effect(() => {
91
92
  const current = value ?? '';
92
93
 
94
+ // 🚫 Skip first run
95
+ if (!initialized) {
96
+ lastValue = current;
97
+ initialized = true;
98
+ return;
99
+ }
100
+
101
+ // ✅ Only fire on real changes
93
102
  if (current !== lastValue) {
94
103
  lastValue = current;
95
104
  onUpdate(current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djcali570/component-lib",
3
- "version": "0.1.103",
3
+ "version": "0.1.104",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",