Skip to content

Message within table while data is loading #8184

@dekhaus

Description

@dekhaus

Hi All

I've got a working mat-table - where data is loaded from an API via HTTP. Works great.

The only issue I have is that the data appears empty while the data is loading.

My DataSource subclass (RequestDataSource) uses a HTTP based service and RequestDataSource has a public boolean variable ('loading') which I initialize to true and set to false when the Observable in the 'connect()' method is done loading data.

Updating the state of my 'loading' variable works ('Loading ...' appears on the page when the data is loading and disappears when its done).

I'd like to either completely hide the table while the data is loading or - better yet, have the table display a sensible message (within its borders) when the data is loading. Is that possible and if so - how ?

p.s. Directly 'hiding' the 'mat-table' element does not work

Thanks
Dave

screen shot 2017-11-01 at 2 54 12 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions