zet-lib 1.2.23 → 1.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/zdataTable.js +11 -0
- package/package.json +1 -1
package/lib/zdataTable.js
CHANGED
|
@@ -154,6 +154,17 @@ class dataTable {
|
|
|
154
154
|
}
|
|
155
155
|
script += `<script type="text/javascript" src="${this.dataTableButtons}"></script>${Util.newLine}`
|
|
156
156
|
|
|
157
|
+
//additional script for typeahead in grid
|
|
158
|
+
let typeaheadScript = ''
|
|
159
|
+
for (let key in this.MYMODEL.widgets) {
|
|
160
|
+
if (this.MYMODEL.widgets[key].name == 'typeahead') {
|
|
161
|
+
typeaheadScript += `if($("#${key}").val()){setTimeout(()=>{$("#${key}").change();},1000)};`
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (typeaheadScript) {
|
|
165
|
+
script += `<script type="text/javascript">$(function () {${typeaheadScript}})</script>${Util.newLine}`
|
|
166
|
+
}
|
|
167
|
+
|
|
157
168
|
return script
|
|
158
169
|
}
|
|
159
170
|
}
|