2014-12-02 2 views
2

간단한 그리드에서 무한대 스크롤링을 구현하려고합니다. HTML은 다음과 같습니다 :Angular-Ui Scroll 필터링

<div class="text-center" style="background-color:#eee;"> 
    <H2 style="margin-top:0px;">Customer List</H2> 
    <hr /> 
    Search: <input ng-model="customerVm.search" /> <br /> <br /> 

    <table class="table table-hover" ui-scroll-viewport style="height:500px;"> 
     <tbody> 
     <tr ui-scroll="customer in customerVm.datasource" ng-model="customerVm.gridResult" "buffer-size="10"> 
       <td> 
     </tbody> 
    </table> 
</div> 

검색 상자 모델을 기반으로 그리드에있는 것을 필터링하고 싶습니다. 충분히 간단합니다. 나는 일반적으로 단지 대신 "▽를 스크롤"의 사용과

<tr ng-repeat="customer in customerVm.datasource | filter:customerVm.search" ng-model="customerVm.gridResult" "buffer-size="10"> 
       <td>{{customer.customername}}</td> 
      </tr> 

그러나 NG 반복으로 다음을 사용 나는

Expected uiScroll in form of '_item_ in _datasource_' but got 'customer in customerVm.datasource | filter:customerVm.search' 

내가 뭔가를 놓치고 오류를 얻고 NG-반복 Angular-ui 스크롤을 사용하여 데이터를 필터링하는 방법은 무엇입니까? 무엇이든이있는 경우 그때

item in datasource 

이 나를 그 필터링 각도-UI를 스크롤 할 수 없습니다 생각하게 에러가 발생 문제를 일으키는 스크롤 LIB의 라인을 참조하십시오. 어떤 아이디어가 있습니까?

답변

1

필터링은 불행하게도 아직까지는 가능하지 않습니다. 오류가 암시 하듯이. Readme file의 "매개 변수"를 참조하십시오. 데이터 소스 "get"함수에서 고유 한 필터를 구현할 수 있습니다. 공식 examples도 참조하십시오.