how to make a accordion responsive when browser is resized?

I have used mat-dialog to create a pop-up window which is fixed when we resize the window. In the pop-up window, I have used a table with expandable rows. There is an inner table inside the expandable row element.I have applied a scroll on the tbody of inner table.I want to make it responsive so that whenever the browser is resized it’s content is same and there is no scroll on the pop-up window.the height of the scrollbar of tbody should increase and decrease with the height and width of the browser.
When I run the application, it looks like this on a desktopfullscreen image. When I minimise my screen from top,I it looks like this minimise

Source: Angular Questions