How to use scrollStrategy in MatDialog?

前端 未结 6 1216
独厮守ぢ
独厮守ぢ 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 02:53

    compare all the files difference. there is extra css in style.css

    .cdk-global-overlay-wrapper {
      pointer-events: auto;
      display: block;
      position: relative;
      overflow: auto;
      text-align: center;
    }
    
    .cdk-global-overlay-wrapper::before {
      content: '';
      display: inline-block;
      height: 100%;
      white-space: nowrap;
    }
    
    .cdk-overlay-pane {
      display: inline-block;
      position: relative;
      text-align: left;
      white-space: normal;
    }

提交回复
热议问题