@ngrdt/forms 0.0.54 → 0.0.56
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/fesm2022/ngrdt-forms.mjs +8 -3
- package/fesm2022/ngrdt-forms.mjs.map +1 -1
- package/index.d.ts +11 -2
- package/package.json +3 -3
package/fesm2022/ngrdt-forms.mjs
CHANGED
|
@@ -561,7 +561,8 @@ class RdtOfflineSelectDatasource extends RdtSelectDatasource {
|
|
|
561
561
|
preprocessData(data) {
|
|
562
562
|
return data.map((item) => ({
|
|
563
563
|
value: item.value,
|
|
564
|
-
label:
|
|
564
|
+
label: item.label,
|
|
565
|
+
prepLabel: this.preprocessLabel(item.label),
|
|
565
566
|
}));
|
|
566
567
|
}
|
|
567
568
|
filterData(query) {
|
|
@@ -572,7 +573,7 @@ class RdtOfflineSelectDatasource extends RdtSelectDatasource {
|
|
|
572
573
|
if (!prepQuery) {
|
|
573
574
|
return this.preprocessedData;
|
|
574
575
|
}
|
|
575
|
-
return this.preprocessedData.filter((item) => item.
|
|
576
|
+
return this.preprocessedData.filter((item) => item.prepLabel.includes(prepQuery));
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
579
|
|
|
@@ -967,10 +968,14 @@ class RdtSelectOfflineDatasourceProviderDirective {
|
|
|
967
968
|
}));
|
|
968
969
|
}
|
|
969
970
|
}
|
|
971
|
+
getDatasourceClass() {
|
|
972
|
+
return RdtOfflineSelectDatasource;
|
|
973
|
+
}
|
|
970
974
|
optionsEffect = effect(() => this.setDatasource());
|
|
971
975
|
setDatasource() {
|
|
972
976
|
const options = this.options();
|
|
973
|
-
this.
|
|
977
|
+
const Datasource = this.getDatasourceClass();
|
|
978
|
+
this.store.setDatasource(new Datasource(options));
|
|
974
979
|
}
|
|
975
980
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: RdtSelectOfflineDatasourceProviderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
976
981
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0", type: RdtSelectOfflineDatasourceProviderDirective, isStandalone: true, inputs: { optionsInput: { classPropertyName: "optionsInput", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|