How to use scrollStrategy in MatDialog?

前端 未结 6 1229
独厮守ぢ
独厮守ぢ 2021-02-05 02:34

I tried to make a scroll for a dialog in reposition strategy, but it doesn\'t work for me.

const scrollStrategy = this.overlay.scrollStrategies.reposition();
con         


        
6条回答
  •  长情又很酷
    2021-02-05 02:41

    Since https://github.com/angular/material2/pull/11235, .mat-dialog-container got max-height: inherit which should solve your problem.

    Setting maxHeight: window.innerHeight + 'px' on the dialog configuration prevents the dialog from growing bigger than the screen.

提交回复
热议问题