使用topjui-combogrid时,输入时自动后台搜索匹配,反复输入再退格删除有时js会报错,不知道为什么。

提问 未结 1 4603
悬赏:20飞吻
4topjui.core.min.js:11 Uncaught TypeError: Cannot read property 'length' of undefined
at _0x1A2C0 (topjui.core.min.js:11)
at _0x1A322 (topjui.core.min.js:10)
at HTMLTableElement.<anonymous> (topjui.core.min.js:11)
at Function.each (jquery.min.js:2)
at n.fn.init.each (jquery.min.js:2)
at Object.clearSelections (topjui.core.min.js:11)
at n.fn.init.$.<computed>.<computed> [as datagrid] (topjui.core.min.js:11)
at d (topjui.core.min.js:14)
at f (topjui.core.min.js:14)
at e (topjui.core.min.js:14)
_0x1A2C0 @ topjui.core.min.js:11
_0x1A322 @ topjui.core.min.js:10
(anonymous) @ topjui.core.min.js:11
each @ jquery.min.js:2
each @ jquery.min.js:2
clearSelections @ topjui.core.min.js:11
$.<computed>.<computed> @ topjui.core.min.js:11
d @ topjui.core.min.js:14
f @ topjui.core.min.js:14
e @ topjui.core.min.js:14
query @ topjui.core.min.js:14
(anonymous) @ topjui.core.min.js:13

前端写法
<input type="text" name="selectparts"
data-toggle="topjui-combogrid"
data-options="id:'selectparts',panelWidth:600,panelHeight:300,
idField: 'parts_no',
textField: 'parts_name',
required:false,
pagination:true,
mode:'remote',
url: '/Action/StoreGoodsAct.ashx?do=getStoreGoodsdata',
columns:[[

{ field: 'parts_no', title: '物料编号', sortable: false ,width: 120},
{ field: 'parts_name', title: '物料名称', sortable: false,width: 120},
{ field: 'store_num', title: '库存数量', sortable: false,width: 80},
{ field: 'depot_name', title: '仓库', sortable: false,width: 80},
{ field: 'location', title: '库位', sortable: false,width: 80}
]],param:'parts_name:parts_name'">
回帖
回帖须知