[英]JQuery Datatables - Search - Remove Dom Element
I have jquery datable with pagination and search active. 我有分页和搜索活跃的jQuery datable。
The first column hold a checkbox, from a list of items. 第一列包含项目列表中的复选框。
Some of these items are already checked (coming from database) 其中一些项目已被检查(来自数据库)
When I do the search, the jQDatatables, remove the dom elements and some of 'checked' itens are not showing 当我执行搜索时,删除jQDatatables的dom元素,并且某些“选中”的itens没有显示
The problem is, when I submit the form with checked values and filter is 'active', the others checked values are not sending to post. 问题是,当我提交带有已检查值的表单并且过滤器处于“活动”状态时,其他已检查值未发送至过帐。 - because they are not on dom table- only the filtered.
-因为它们不在dom表中-仅过滤。
There is a way to jqDt, not remove the dom element when filtering, just put a 'hidden' class on tr element? 有一种方法可以jqDt,而不是在过滤时删除dom元素,而只是在tr元素上放置一个“隐藏”类?
Regards 问候
Just add this to your table definition and first column will never be searched again 只需将其添加到表定义中,就不会再搜索第一列
"aoColumns": [
{ "bSearchable": false, "bSortable": false },
null,
null,
null,
null,
null
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.