mmhglobal-dynamicform 2.9.1 → 2.9.2
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/README.md +5 -1
- package/esm2020/lib/sfquerybuilder/sfquerybuilder.component.mjs +28 -1
- package/fesm2015/mmhglobal-dynamicform.mjs +27 -0
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +27 -0
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/lib/sfquerybuilder/sfquerybuilder.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -87,6 +87,7 @@ import * as i3$8 from '@progress/kendo-angular-toolbar';
|
|
|
87
87
|
import { MultiSelect, DropDownList } from '@syncfusion/ej2-dropdowns';
|
|
88
88
|
import { createElement, getComponent } from '@syncfusion/ej2-base';
|
|
89
89
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
|
90
|
+
import { Query } from '@syncfusion/ej2-data';
|
|
90
91
|
|
|
91
92
|
/********** Angular **********/
|
|
92
93
|
class ZComponentService {
|
|
@@ -13140,21 +13141,47 @@ class SfquerybuilderComponent {
|
|
|
13140
13141
|
mode: 'CheckBox',
|
|
13141
13142
|
change: (e) => {
|
|
13142
13143
|
this.qryBldrObj.notifyChange(e.value, e.element);
|
|
13144
|
+
},
|
|
13145
|
+
// set contains search by default
|
|
13146
|
+
filtering: (e) => {
|
|
13147
|
+
this.onFiltering(e, optionList);
|
|
13143
13148
|
}
|
|
13144
13149
|
});
|
|
13145
13150
|
}
|
|
13146
13151
|
else {
|
|
13147
13152
|
return new DropDownList({
|
|
13153
|
+
allowFiltering: true,
|
|
13148
13154
|
dataSource: optionList,
|
|
13149
13155
|
fields: { text: 'text', value: 'value' },
|
|
13150
13156
|
value: args.values,
|
|
13151
13157
|
change: (e) => {
|
|
13152
13158
|
e.value !== null ? this.qryBldrObj.notifyChange(e.itemData.value, e.element) : ignoreElements;
|
|
13159
|
+
},
|
|
13160
|
+
// set default search by 'contains'
|
|
13161
|
+
filtering: (e) => {
|
|
13162
|
+
this.onFiltering(e, optionList);
|
|
13153
13163
|
}
|
|
13154
13164
|
});
|
|
13155
13165
|
}
|
|
13156
13166
|
}
|
|
13157
13167
|
//#endregion
|
|
13168
|
+
onFiltering(e, optionList) {
|
|
13169
|
+
// load overall data when search key empty.
|
|
13170
|
+
if (e.text === '') {
|
|
13171
|
+
e.updateData(this.data);
|
|
13172
|
+
}
|
|
13173
|
+
else {
|
|
13174
|
+
// Define array data
|
|
13175
|
+
let searchData = optionList;
|
|
13176
|
+
//Bind the filter event
|
|
13177
|
+
let query = new Query();
|
|
13178
|
+
//frame the query based on search string with filter type.
|
|
13179
|
+
query = (e.text != "") ? query.where("text", "contains", e.text, true) : query;
|
|
13180
|
+
//pass the filter data source, filter query to updateData method.
|
|
13181
|
+
e.updateData(searchData, query);
|
|
13182
|
+
}
|
|
13183
|
+
}
|
|
13184
|
+
;
|
|
13158
13185
|
setQueryValue(savedData) {
|
|
13159
13186
|
//if (!this.qryBldrObj) {
|
|
13160
13187
|
// console.warn('query builder object is null.');
|