The value of the NumericTextbox is of type number.
Please allow also null and undefined as valid types for the value field.
I like to force a user input into the without setting a default value.
In this case I want to set the value to null. If I do this, the type checker complains that null is not a valid type for the value field.
Example:
@Component({
selector: 'my-component',
template: '<kendo-numerictextbox [value]="__value" (valueChange)="onValueChange($event)"></kendo-numerictextbox>',
})
export class MyComponent {
public __value: number | null = null;
public onValueChange(value: number|null): void {
this.__value = value;
}
}
Hi Markus,
I would suggest to try setting the type of the numerictextbox value directly to number in this case. This should not prevent setting the value to null for scenarios in which there should not be a default set.
Please let me know if this information helps or I could provide further assistance.
Regards,
Dimiter Madjarov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.