【发布时间】:2016-07-01 17:33:27
【问题描述】:
形成这个链接:
Bootstrap table filtering not working
我的代码:
<table
data-url="<?php echo Yii::app()->createUrl('sj/getdata_list'); ?>"
data-pagination="true"
id="tables"
class="table table-striped table-hover "
data-toggle="table"
data-side-pagination="server"
data-page-list="[5, 10, 20, 50, 100, 200]"
data-search="true"
data-show-pagination-switch="showPaginationSwitch"
data-filters="true"
data-filter-control="true"
data-sort-order="desc"
data-selectable-rows="true"
data-item-id="id"
data-show-columns="true"
data-selectable-rows-action="load_panels"
data-minimum-count-columns="1"
data-show-refresh="true"
data-search-align="left"
data-toolbar="#Customer-custom-toolbar"
data-show-filter="true"
data-striped="true"
data-sort-name="id"
data-show-toggle="true"
data-detail-view="true"
data-detail-formatter="detailFormatter"
data-id-field="no_sj"
data-editable-emptytext="-"
data-editable-url="<?php echo Yii::app()->createUrl('sj/edit_sj');?>"
data-filter-control="true"
>
<caption style="border: inherit; background-color: lightgrey;">
<span class="align-left"><strong>Tabel Pembelian yang belum diterima</strong></span>
</caption>
<thead>
<tr>
<th data-field="no_sj" data-sortable="true" data-filter-control="input">No Surat Jalan</th>
<th data-field="tgl_sj" data-sortable="true" data-filter-control="select">Tgl Surat Jalan</th>
<th data-field="cabang" data-sortable="true" data-filter-control="input">Cabang</th>
<th data-field="qnty" data-sortable="true">Quantity</th>
<th data-field="harga" data-sortable="true" class="hidden">Harga</th>
<th data-field="jt" data-sortable="true">JT</th>
<th data-field="stat_terima" data-sortable="true" data-filter-control="select" class='set_edit_status' data-editable-title='Status :' data-pk='no_sj' data-editable="true">Status</th>
<th data-field="tgl_terima" data-sortable="true" data-filter-control="datepicker" class='set_edit_tanggal' data-editable-type="date" data-editable-viewformat='dd-mm-yyyy' data-editable-clear='false' data-editable-format='dd-mm-yyyy' data-editable-datepicker='{weekStart:1}' data-pk='no_sj' data-editable="true" >Tanggal</th>
<th data-field="ket_terima" data-sortable="true" class="hidden">Ket</th>
</tr>
</thead>
</table>
过滤器“选择”中的结果不起作用。 它只显示选择显示的页面,如果在下一页/上一页中过滤器选择没有出现在选项选择过滤器中。
还有什么我想念的吗?
【问题讨论】:
-
cz 卡住了,然后我使用另一种方式,
data-toolbar="#Customer-custom-toolbar"我使用自定义过滤。如果有人有答案,问题仍然存在,也许这会改进我/其他人的代码。 .
标签: jquery twitter-bootstrap bootstrap-table