@osovitny/anatoly 2.14.30 → 2.14.31

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.
@@ -3889,6 +3889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
3889
3889
  class UrlSlugComponent extends BaseEditComponent {
3890
3890
  constructor() {
3891
3891
  super();
3892
+ this.firstValue = true;
3892
3893
  //Inputs
3893
3894
  this.title = 'Permalink:';
3894
3895
  this.isTitleVisible = true;
@@ -3896,6 +3897,9 @@ class UrlSlugComponent extends BaseEditComponent {
3896
3897
  //Outputs
3897
3898
  this.generating = new EventEmitter();
3898
3899
  }
3900
+ ngOnInit() {
3901
+ this.startWatching();
3902
+ }
3899
3903
  generateUrlSlug(text) {
3900
3904
  let slugedText = Utils.slugify(text);
3901
3905
  let event = { urlSlug: slugedText };
@@ -3906,6 +3910,9 @@ class UrlSlugComponent extends BaseEditComponent {
3906
3910
  startWatching() {
3907
3911
  if (this.watchedControlName) {
3908
3912
  this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
3913
+ if (this.firstValue) {
3914
+ return;
3915
+ }
3909
3916
  this.generateUrlSlug(value);
3910
3917
  });
3911
3918
  }