Table

Tables for dynamic data; follow the examples closely, including the #cell ref

Contents

Allow only one row to be expanded at once

Non-responsive table

Date
Project Name
Status
Amount

16/08/1973

Build a website

Released

200

Transaction ID

12345123434

Transaction Date

16/08/1973

Project Name

Build a website

Project Description

This is a description that will only show up on expand

16/08/1973

Design a website abc

Released

10

Transaction ID

34534534534

Transaction Date

16/08/1973

Project Name

Design a website abc

Project Description

This is a description that will only show up on expand

16/08/1973

Project for freelancer

Released

30

Transaction ID

675756756756

Transaction Date

16/08/1973

Project Name

Project for freelancer

Project Description

This is a description that will only show up on expand

Responsive table

Date
Project Name
Status
Amount
Date

16/08/1973

Project Name

Build a website

Status

Released

Amount

200

Transaction ID

12345123434

Transaction Date

16/08/1973

Project Name

Build a website

Project Description

This is a description that will only show up on expand

Date

16/08/1973

Project Name

Design a website abc

Status

Released

Amount

10

Transaction ID

34534534534

Transaction Date

16/08/1973

Project Name

Design a website abc

Project Description

This is a description that will only show up on expand

Date

16/08/1973

Project Name

Project for freelancer

Status

Released

Amount

30

Transaction ID

675756756756

Transaction Date

16/08/1973

Project Name

Project for freelancer

Project Description

This is a description that will only show up on expand

enableAutoExpandOnSingleItem = true.

This allows the table to automatically expand on initial load when there is only one item in the row.
Date
Project Name
Status
Amount

16/08/1973

Build a website

Released

200

Transaction ID

12345123434

Transaction Date

16/08/1973

Project Name

Build a website

Project Description

This is a description that will only show up on expand

enableAutoExpandOnSingleItem = false
Date
Project Name
Status
Amount

16/08/1973

Build a website

Released

200

Transaction ID

12345123434

Transaction Date

16/08/1973

Project Name

Build a website

Project Description

This is a description that will only show up on expand

Inputs in Expandable
enableAutoExpandOnSingleItem ?: boolean = false
expandable ?: boolean = false
hover ?: boolean = false
responsive ?: boolean = true
singleExpandable ?: boolean = false

Only allow expanding one row at a time

Also set in this example
dataSource : readonly T[]
Outputs
pageSelected ?: any = new EventEmitter<number>()
rowExpanded ?: any = new EventEmitter<number | undefined>()

Emits the index of the currently expanded row - undefined if no row is expanded