Angular 2 - expand collapse table row

前端 未结 2 1290
自闭症患者
自闭症患者 2021-01-01 06:47

There is a requirement to show an in-place row details when I click on an inspector icon of the table which would expand or collapse just like a toggle on click of a button

2条回答
  •  时光取名叫无心
    2021-01-01 07:34

    Very similar to what I answered here: Angular Material Collapsible Card

    StackBlitz: https://stackblitz.com/edit/angular-kxkckz

    You'll need something like below if you don't want to use any packages:

    
    
    
    
    Click to toggle content 1

    Showing content 1

    Grass is green

    Click to toggle content 2

    Showing content 2

    The sky is blue

提交回复
热议问题