@ethlete/core 4.29.2 → 4.29.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ethlete/core
|
|
2
2
|
|
|
3
|
+
## 4.29.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6b05b76`](https://github.com/ethlete-io/ethdk/commit/6b05b7603cfd0038dda1336c7c0acf590556a4fa) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix `controlValueSignal` not reporting the initial value if the passed control is a required input
|
|
8
|
+
|
|
3
9
|
## 4.29.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -2195,14 +2195,14 @@ const controlValueSignal = (control, options) => {
|
|
|
2195
2195
|
let initialValue = null;
|
|
2196
2196
|
const getRawValueSafe = (ctrl) => {
|
|
2197
2197
|
try {
|
|
2198
|
-
return ctrl?.getRawValue() ?? null;
|
|
2198
|
+
return isSignal(ctrl) ? (ctrl()?.getRawValue() ?? null) : (ctrl?.getRawValue() ?? null);
|
|
2199
2199
|
}
|
|
2200
2200
|
catch {
|
|
2201
2201
|
// Ignore errors. This can happen if the passed control is a required input and is not yet initialized.
|
|
2202
2202
|
return null;
|
|
2203
2203
|
}
|
|
2204
2204
|
};
|
|
2205
|
-
initialValue =
|
|
2205
|
+
initialValue = getRawValueSafe(control);
|
|
2206
2206
|
const controlStream = isSignal(control)
|
|
2207
2207
|
? toObservable(control)
|
|
2208
2208
|
: of(control);
|
|
@@ -2212,7 +2212,7 @@ const controlValueSignal = (control, options) => {
|
|
|
2212
2212
|
const vcsObs = options?.debounceTime
|
|
2213
2213
|
? ctrl.valueChanges.pipe(debounceTime(options.debounceTime))
|
|
2214
2214
|
: ctrl.valueChanges;
|
|
2215
|
-
return vcsObs.pipe(map(() =>
|
|
2215
|
+
return vcsObs.pipe(startWith(ctrl.getRawValue()), map(() => ctrl.getRawValue()));
|
|
2216
2216
|
}));
|
|
2217
2217
|
const obs = !options?.debounceFirst ? merge(of(initialValue), controlObs) : controlObs;
|
|
2218
2218
|
return toSignal(obs.pipe(distinctUntilChanged((a, b) => equal(a, b))), {
|