Ion-select doesn't scroll in Ionic 3

南楼画角 提交于 2021-01-28 21:31:46

问题


This select contains the list of all countries in register form. The point is that the ion-content in the form page is scrollable but select it self is not scrolling. Here is the code:

 <ion-item>
       <ion-select interface="action-sheet" class="select" placeholder="Country">
          <ion-option ngDefaultControl [value]='country.name' *ngFor="let country of countries">{{country.name}}
          </ion-option>
        </ion-select>
       </ion-item>

Why select scroll is not working?


回答1:


This is a known issue, you can track at https://github.com/ionic-team/ionic/issues/17311#issuecomment-460829890

Ionic have provided a workaround by setting following css in global.scss

.action-sheet-group {
    overflow: auto !important;
}

Hope that helps



来源:https://stackoverflow.com/questions/54589530/ion-select-doesnt-scroll-in-ionic-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!