1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular reactive form, how to know if valueChanges is triggered by user?

Discussão em 'Angular' iniciado por LtChang, Setembro 10, 2024.

  1. LtChang

    LtChang Guest

    When subscribing valueChanges event, sometimes I want to handle the event only when the change is triggered by user, not by pathValue or setValue.

    I know patchValue have a option emitEvent: false, but that will skip the whole event for all subscribers, and cause some operators like pairwise not working appropriately as well

    Is there anyway to know who (user or code) trigger the event in valueChanges?

    Continue reading...

Compartilhe esta Página