0

필터 컨트롤 확장명이있는 부트 스트랩 테이블을 설정했습니다. 필자가 필터링하고자하는 테이블은 많은 popovers와 툴팁을 제공합니다. 그러나 필터링 후 작업을 중단합니다. 다시 활성화하려면 어떻게해야합니까?필터 컨트롤이 작동하지 않는 부트 스트랩 테이블의 팝 오버

여기에서 볼 수있는 내 코드의 예 (위치 유형 "기타"팝 오버를해야한다, 이것은 단지 처음으로 필터링하기 전에 작동) :

<table ref="mainTable" class="table table-striped table-bordered table-hover" 
     cellSpacing="0" id="mainTable" data-show-toggle="true" 
     data-show-columns="true" data-search="true" data-pagination="true" data-filter-control="true"> 
    <thead> 
     <tr> 
      <th data-field="state" data-checkbox="true"></th> 
      <th data-field="CustomerName" data-sortable="true" data-filter-control="select">Customer Name</th> 
      <th data-field="LocationType" data-sortable="true">Location Type</th> 
      <th data-field="Location" data-sortable="true" data-filter-control="select">Location</th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr> 
      <td></td> 
      <td>Cap Corp</td> 
      <td>Main</td> 
      <td>Norwalk CT 06851</td> 
     </tr> 
     <tr> 
      <td></td> 
      <td>Cap Corp</td> 
      <td><a class="ajaxPopover">Other</a></td> 
      <td>Norwalk CT 06851</td> 
     </tr> 
     <tr> 
      <td></td> 
      <td>Tel</td> 
      <td>Main</td> 
      <td>Slough SL1 4DX</td> 
     </tr> 
     <tr> 
      <td></td> 
      <td>Tel</td> 
      <td><a class="ajaxPopover">Other</a></td> 
      <td>London W1B 5HQ</td> 
     </tr> 
    </tbody> 
</table> 

을 ... 다음 자바 스크립트 코드 :

$('#mainTable').bootstrapTable({ 
}); 

// Add some popovers 
$('.ajaxPopover').popover({ 
    html: true, 
    placement: "auto right", 
    container: 'body', 
    content: "<b>Text</b> Other Text" 
}); 

http://jsfiddle.net/7bpLrafx/4/

어떤 도움을 주셔서 감사합니다!

답변

0

표가 변경되면 (예 : 정렬, 표시 변경 등) 팝업을 다시 초기화해야합니다.

JS :

$('#mainTable').on('all.bs.table', function() { 
    $('.ajaxPopover').popover({ 
    html: true, 
    placement: "auto right", 
    container: 'body', 
    content: "<b>Text</b> Other Text" 
    }); 
}); 
+0

덕분에 내 문제를 해결 많이. :) –

관련 문제