@dev-tcloud/tcloud-ui 0.0.60 → 0.0.61
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/esm2020/lib/_modules/tcloud-ui-filters/tcloud-ui-filters.component.mjs +33 -4
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +32 -3
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +32 -3
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3167,13 +3167,35 @@ class TCloudUiFiltersComponent {
|
|
|
3167
3167
|
this.first_active_filter = true;
|
|
3168
3168
|
}
|
|
3169
3169
|
}
|
|
3170
|
-
|
|
3171
|
-
this.init();
|
|
3170
|
+
this.toSubmit();
|
|
3172
3171
|
});
|
|
3173
3172
|
}
|
|
3174
3173
|
ngAfterViewInit() {
|
|
3175
3174
|
// child is set
|
|
3176
3175
|
}
|
|
3176
|
+
/*
|
|
3177
|
+
auto_filter(){
|
|
3178
|
+
setTimeout(() => {
|
|
3179
|
+
if( this.filters ){
|
|
3180
|
+
const filters = JSON.parse(JSON.stringify( this.filters ));
|
|
3181
|
+
for(let i = 0; i < (filters).length; i++){
|
|
3182
|
+
if( filters[i].value ){
|
|
3183
|
+
if( filters[i].type === 'datetime-local' ){
|
|
3184
|
+
try {
|
|
3185
|
+
filters[i].searchText = new Date( `${filters[i].value}` );
|
|
3186
|
+
} catch (error) {}
|
|
3187
|
+
}else{
|
|
3188
|
+
filters[i].searchText = filters[i].value;
|
|
3189
|
+
}
|
|
3190
|
+
this.first_active_filter = true;
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
console.log('auto_filter onSubmit', filters);
|
|
3194
|
+
this.onSubmit.emit(filters);
|
|
3195
|
+
}
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
*/
|
|
3177
3199
|
ngOnChanges(changes) {
|
|
3178
3200
|
if (changes && changes['data']) {
|
|
3179
3201
|
const data = changes['data'].currentValue;
|
|
@@ -3237,9 +3259,16 @@ class TCloudUiFiltersComponent {
|
|
|
3237
3259
|
if ((!filter.searchText || filter.searchText && filter.searchText === '') && filter.type !== "boolean") {
|
|
3238
3260
|
delete (filters[i]);
|
|
3239
3261
|
}
|
|
3262
|
+
if (filter.type === "boolean") {
|
|
3263
|
+
if (!filter.searchText) {
|
|
3264
|
+
filter.searchText = false;
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3240
3267
|
});
|
|
3241
3268
|
}
|
|
3242
|
-
|
|
3269
|
+
filters = filters.filter(Boolean);
|
|
3270
|
+
console.log('onSubmit', filters);
|
|
3271
|
+
this.onSubmit.emit(filters);
|
|
3243
3272
|
}
|
|
3244
3273
|
collectionFind(obj, path) {
|
|
3245
3274
|
const pathArray = path.split(".");
|