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

MatTableDataSource return a promise for ~ 7000 lines

Discussão em 'Angular' iniciado por GPiter, Setembro 6, 2025.

  1. GPiter

    GPiter Guest

    I have a problem when try to put a lot of data in mattabledatasource, I want at least to display a loader but I don't know when data is already set. I try to use a promise like that :

    return new Promise(resolve => {
    this.infos.map(info => {
    info.members.map(member => {
    member.contacts.map(contact => {
    dataSource.push({
    contact,
    member
    });
    });
    });
    });
    this.dataSource = new MatTableDataSource(dataSource);
    resolve();
    });


    But it is not working, just my table is freezing 10 seconds. How I can know when all maps + set data source is done ?

    Continue reading...

Compartilhe esta Página