Angular Material get previously selected value from MatSelectChange event

Discussão em 'Angular' iniciado por CAlex, Dezembro 30, 2024.

  1. CAlex

    CAlex Guest

    I am capturing MatSelectChange events from a dynamic forms library in my .ts file. This works just fine, but when I capture the event, I don't know how to acquire the previously selected value.

    Getting the current value is easy, I am surprised that the prior value isn't immediately available for access.

    The event contains access to $event.value and $event.source.

    I have tried to dig deep into the source member, but I can't find the previous value there either as it is just the current select control.

    Link to API

    Continue reading...

Compartilhe esta Página