Skip to content

Commit 545aac3

Browse files
committed
fix default value argument
1 parent 7c2f036 commit 545aac3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

exampleVault/Input Fields/Progress Bar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ INPUT[progressBar(showcase, minValue(0), maxValue(10), stepSize(0.1)):progress4]
2222
```
2323

2424
```meta-bind
25-
INPUT[progressBar]
25+
INPUT[progressBar(defaultValue(53))]
2626
```

packages/core/src/fields/inputFields/AbstractInputField.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ export abstract class AbstractInputField<MetadataValueType, ComponentValueType>
136136
}
137137

138138
protected onMount(targetEl: HTMLElement): void {
139+
// fix for computed signal possibly not having the correct value, as the class might not have been fully initialized
140+
this.inputSignal.set(this.inputSignal.get());
141+
139142
this.computedSignal.registerListener({
140143
callback: value => this.inputFieldComponent.setValue(this.reverseMapValue(value)),
141144
});

packages/core/src/utils/ZodUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function validate<T>(validator: z.ZodType<T>, args: T): void {
5151
throw new MetaBindInternalError({
5252
errorLevel: ErrorLevel.CRITICAL,
5353
effect: 'invalid arguments supplied to function',
54-
cause: fromZodError(result.error),
54+
cause: result.error,
5555
});
5656
}
5757
}

0 commit comments

Comments
 (0)