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.
Files changed (2) hide show
  1. package/lib/zdataTable.js +11 -0
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"