Giter Site home page Giter Site logo

Comments (4)

gparlakov avatar gparlakov commented on May 17, 2024 1

@Mongole666 just released version 1.1.2 with support for that

from forms-typed.

gparlakov avatar gparlakov commented on May 17, 2024

Add the types of the emissions

 * Type encapsulating the Angular Form options:
 * `emitEvent` - do we emit event;
 * `onlySelf` - do we bubble up to parent
 * `emitModelToViewChange` - When true or not supplied (the default), each change triggers an onChange event to update the view.
 * `emitViewToModelChange` - When true or not supplied (the default), each change triggers an ngModelChange event to update the model.
 */
export interface FormEventOptions {
    emitEvent?: boolean;
    onlySelf?: boolean;
    emitModelToViewChange?: boolean;
    emitViewToModelChange?: boolean;
}

from forms-typed.

Mongole666 avatar Mongole666 commented on May 17, 2024

Handing ValidatorFn[] and AsyncValidatorFn[] seems to be done by just adding these to the constructor call in the types. Or am I missing something here? So can this issue be closed with a new minor version in the near future? @gparlakov

from forms-typed.

gparlakov avatar gparlakov commented on May 17, 2024

@Mongole666 yes - you are correct, I just saw that the typedFormControl does not support that while typedFormGroup and typedFormArray do... Will definitely do a minor release with that, thanks.

In the mean time Validators.compose and Validators.composeAsync can do the trick...

const form = typedFormControl<number>(1, Validators.compose([Validators.required, Validators.minLength(1)]), Validators.composeAsync([....]))

from forms-typed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.