@elite.framework/ng.core 1.0.40 → 1.0.41
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.
|
@@ -4136,7 +4136,7 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4136
4136
|
loadDefaultValue() {
|
|
4137
4137
|
this.loading = true;
|
|
4138
4138
|
const vf = this.to['valueField'] || 'id';
|
|
4139
|
-
const fixedFilters = this.
|
|
4139
|
+
const fixedFilters = this.getFixedFilters();
|
|
4140
4140
|
const lf = this.to['loadDefaultField'] || 'isDefault';
|
|
4141
4141
|
const lfValue = this.to['loadDefaultValue'] || true;
|
|
4142
4142
|
const searchParams = {
|
|
@@ -4252,10 +4252,18 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4252
4252
|
});
|
|
4253
4253
|
}
|
|
4254
4254
|
}
|
|
4255
|
+
getFixedFilters() {
|
|
4256
|
+
const fixedFilters = this.to['fixedFilters'];
|
|
4257
|
+
if (typeof fixedFilters === 'function') {
|
|
4258
|
+
// Call with current model (and optionally field)
|
|
4259
|
+
return fixedFilters(this.model);
|
|
4260
|
+
}
|
|
4261
|
+
return fixedFilters || {};
|
|
4262
|
+
}
|
|
4255
4263
|
search(event) {
|
|
4256
4264
|
const q = event.query?.toString().toLowerCase() || '';
|
|
4257
4265
|
const lf = this.to['labelField'] || 'name';
|
|
4258
|
-
const fixedFilters = this.
|
|
4266
|
+
const fixedFilters = this.getFixedFilters();
|
|
4259
4267
|
if (this.to['offline']) {
|
|
4260
4268
|
this.options_ = this.to['offlineDataFn']
|
|
4261
4269
|
? this.to['offlineDataFn'](q)
|