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
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