这是我对tablesorter的选择:
.tablesorter({
theme: 'altair',
headerTemplate: '{content} {icon}',
widgets: ['zebra', 'filter'],
widgetOptions: {
filter_reset : 'button.ts_cf_reset',
filter_cssFilter: [,'', 'ts_cf_datepicker_1','ts_cf_datepicker_2', 'ts_cf_select_single']
}
})
表格是:
<table ref="listaElementos" className="uk-table uk-table-hover uk-table-align-vertical uk-table-nowrap tablesorter tablesorter-altair" id="ts_custom_filters">{/* id="ts_custom_filters ts_pager_filter" */}
<thead>
<tr>
<th className="uk-text-center filter-false remove">ID</th>
<th className="uk-text-center" data-placeholder="Buscar empresa">Suministrador</th>
<th className="uk-text-center" data-placeholder="Seleccione rango">Fecha de contrato</th>
<th className="uk-text-center" data-placeholder="Seleccione rango">Vencimiento de contrato</th>
<th className="uk-text-center filter-select" data-placeholder="Seleccione Vigencia">Vigencia</th>
<th className="uk-text-center filter-false remove">Acciones</th>
</tr>
</thead>
<tbody>
{contratos}
</tbody>
</table>
我需要的是将占位符“Seleccione Vigencia”显示为下拉列表(select)的实际选项,并使用selectize.js。我在加载表时可以看到占位符,但是当我打开下拉列表时我丢失了选项。