2017-03-14 1 views
0

마지막 행 (25 번)으로 이동하여 편집을 클릭하면 드롭 다운이 잘리는 것을 볼 수 있습니다. 이 문제를 해결하는 방법을 알아낼 수 있습니까? 일반적으로 https://plnkr.co/edit/22e9bo?p=previewui-scroll 지시문을 사용할 때 드롭 다운이 잘 리면서

<div ui-scroll-viewport class="col-md-12" style="height: 500px; border: dashed 1px #ddd;"> 
    <table class="table table-bordered table-striped"> 
    <thead> 
     <tr> 
     <th>id</th> 
     <th>source</th> 
     <th>destination</th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr ui-scroll="item in datasource"> 
     <td>{{item.id}} <a ng-click="showDropdown(item.id)">edit</a></td> 
     <td>{{item.source}}</td> 
     <td ng-if="dropdowns.active !== item.id">{{item.destination}}</td> 
     <td ng-if="dropdowns.active === item.id"> 
      <div class="dropdown"> 
      <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> 
      {{item.destination}} 
      <span class="caret"></span> 
      </button> 
      <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> 
       <li><a href="#">10.0.0.0</a></li> 
       <li><a href="#">10.255.255.255</a></li> 
       <li><a href="#">172.16.0.0</a></li> 
       <li><a href="#">172.31.255.255</a></li> 
       <li><a href="#">192.168.255.255</a></li> 
       <li role="separator" class="divider"></li> 
       <li><a href="#">192.168.0.0</a></li> 
      </ul> 
      </div> 
     </td> 
     </tr> 
    </tbody> 
    </table> 
</div> 

답변

0

enter image description here

, 이것이이 아니라 UI 스크롤 문제는이 부트 스트랩은이 DOM에서 드롭 다운 메뉴의 호스트 방법이다. hoster 요소에 overflow-y: scroll이 있으면 질문에 설명 된 상황이 발생합니다. 각도 방식 해결책으로 앵글 -Ui 래퍼를 부트 스트랩에 사용하는 것이 좋습니다 : https://angular-ui.github.io/bootstrap/.

이들은 dropdown-append-todropdown-append-to-body 설정을 가지고있어 어떤 요소 에든 부트 스트랩 드롭 다운을 추가 할 수 있습니다. 이렇게하면 문제가 해결됩니다.