osl-base-extended 1.0.13 → 1.0.15

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.
@@ -1326,7 +1326,21 @@ class OslAutocomplete extends baseComponent {
1326
1326
  label = '';
1327
1327
  required = false;
1328
1328
  disabled = false;
1329
- model = null;
1329
+ _model;
1330
+ _object;
1331
+ set model(val) {
1332
+ if (val) {
1333
+ this._model = val;
1334
+ if (this.object) {
1335
+ this.datasource = [this.object];
1336
+ this.filteredItems = [...this.datasource];
1337
+ this.syncInputFromModel();
1338
+ }
1339
+ }
1340
+ }
1341
+ get model() {
1342
+ return this._model;
1343
+ }
1330
1344
  datasource = [];
1331
1345
  displayField = '';
1332
1346
  valueField = '';
@@ -1338,8 +1352,11 @@ class OslAutocomplete extends baseComponent {
1338
1352
  service;
1339
1353
  set object(val) {
1340
1354
  if (val) {
1341
- this.datasource = [val];
1355
+ this._object = val;
1356
+ this.datasource = [this.object];
1342
1357
  this.filteredItems = [...this.datasource];
1358
+ }
1359
+ if (this.model) {
1343
1360
  this.syncInputFromModel();
1344
1361
  }
1345
1362
  }
@@ -1846,7 +1863,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1846
1863
  class DynamicForm {
1847
1864
  cdr;
1848
1865
  elements = [];
1849
- model;
1866
+ _model;
1867
+ set model(val) {
1868
+ this._model = val;
1869
+ }
1870
+ get model() {
1871
+ return this._model;
1872
+ }
1850
1873
  skeletonLoading = false;
1851
1874
  modelChange = new EventEmitter();
1852
1875
  datasourceCache = inject(DatasourceCacheService);