@rxap/material-table-system 12.5.6 → 12.5.7

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.
@@ -2328,6 +2328,7 @@
2328
2328
  function OptionsCellComponent(renderer) {
2329
2329
  this.renderer = renderer;
2330
2330
  this._subscription = new rxjs.Subscription();
2331
+ this._initialised = false;
2331
2332
  this.defaultViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.unknown:unknown`;
2332
2333
  this.emptyViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.empty:empty`;
2333
2334
  }
@@ -2335,6 +2336,11 @@
2335
2336
  var _this = this;
2336
2337
  // Hide the mat-option elements
2337
2338
  this._subscription.add(this.options.changes.pipe(operators.startWith(null), operators.tap(function () { return _this.options.forEach(function (option) { return _this.renderer.setStyle(option._getHostElement(), 'display', 'none'); }); })).subscribe());
2339
+ this.setViewValue();
2340
+ this._initialised = true;
2341
+ };
2342
+ OptionsCellComponent.prototype.setViewValue = function () {
2343
+ var _this = this;
2338
2344
  if (this.value === undefined || this.value === null) {
2339
2345
  this.viewValue = this.emptyViewValue;
2340
2346
  }
@@ -2349,6 +2355,13 @@
2349
2355
  }
2350
2356
  }
2351
2357
  };
2358
+ OptionsCellComponent.prototype.ngOnChanges = function (changes) {
2359
+ if (this._initialised) {
2360
+ if (changes['value']) {
2361
+ this.setViewValue();
2362
+ }
2363
+ }
2364
+ };
2352
2365
  OptionsCellComponent.prototype.getViewValue = function () {
2353
2366
  var _this = this;
2354
2367
  var _a, _b;
@@ -2361,7 +2374,7 @@
2361
2374
  return OptionsCellComponent;
2362
2375
  }());
2363
2376
  OptionsCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OptionsCellComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
2364
- OptionsCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: OptionsCellComponent, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: core.MatOption, descendants: true }], ngImport: i0__namespace, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2377
+ OptionsCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: OptionsCellComponent, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: core.MatOption, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2365
2378
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OptionsCellComponent, decorators: [{
2366
2379
  type: i0.Component,
2367
2380
  args: [{