W2UI 网格
我想像在 datatables .net 中那样进行网格搜索
它使用'AND'
以空格分隔的搜索文本的条件。
我的要求是不要使用搜索框旁边已经存在的高级搜索,因为它是基于特定列的。
"records": [
{ "recid": 1, "fname": "John", "lname": "Doe", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 2, "fname": "John", "lname": "Motzart", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 3, "fname": "John", "lname": "Franson", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 4, "fname": "Susan", "lname": "Franson", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 5, "fname": "Kelly", "lname": "Franson", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 6, "fname": "Francis", "lname": "Franson", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 7, "fname": "Mark", "lname": "Welldo", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 8, "fname": "Thomas", "lname": "Bahh", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
{ "recid": 9, "fname": "Sergei", "lname": "Rachmaninov", "email": "jdoe@gmail.com", "sdate": "4/3/2012" }
]
现在在w2ui
网格搜索框中我正在搜索“John”然后它应该显示1,2,3 records
然后我正在搜索“john fran”然后它应该只显示3rd record.
如何做到这一点?
我尝试按空格分割搜索框字符串并在 w2ui.js 中进行了更改,但它总是搜索搜索字符串中的最后一个单词,
请帮忙,谢谢:) :)