@ngrdt/forms 0.0.55 → 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.
@@ -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: this.preprocessLabel(item.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.label.includes(prepQuery));
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.store.setDatasource(new RdtOfflineSelectDatasource(options));
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 });