Binder.ts (vaadin-flow-4.0.5) | : | Binder.ts (vaadin-flow-4.0.6) | ||
---|---|---|---|---|
skipping to change at line 149 | skipping to change at line 149 | |||
this.read(this[_emptyValue]); | this.read(this[_emptyValue]); | |||
} | } | |||
/** | /** | |||
* Submit the current form value to a predefined | * Submit the current form value to a predefined | |||
* onSubmit callback. | * onSubmit callback. | |||
* | * | |||
* It's a no-op if the onSubmit callback is undefined. | * It's a no-op if the onSubmit callback is undefined. | |||
*/ | */ | |||
async submit(): Promise<T|void>{ | async submit(): Promise<T|void>{ | |||
if(this[_onSubmit]!==undefined){ | if (this[_onSubmit] !== undefined) { | |||
this.submitTo(this[_onSubmit]); | return this.submitTo(this[_onSubmit]); | |||
} | } | |||
} | } | |||
/** | /** | |||
* Submit the current form value to callback | * Submit the current form value to callback | |||
* | * | |||
* @param endpointMethod the callback function | * @param endpointMethod the callback function | |||
*/ | */ | |||
async submitTo(endpointMethod: (value: T) => Promise<T|void>): Promise<T|void> { | async submitTo(endpointMethod: (value: T) => Promise<T|void>): Promise<T|void> { | |||
const errors = await this.validate(); | const errors = await this.validate(); | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |