@easydata/crud 1.4.1-rc02 → 1.4.1

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.
@@ -6845,7 +6845,7 @@ var getEditDateTimeFormat = function (dtype) {
6845
6845
  };
6846
6846
  var setLocation = function (path) {
6847
6847
  var state = window.history.state;
6848
- history.replaceState(state, document.title, path);
6848
+ history.pushState(state, document.title, path);
6849
6849
  window.dispatchEvent(new Event('ed_set_location'));
6850
6850
  };
6851
6851
 
@@ -8279,6 +8279,10 @@ var easy_data_view_dispatcher_EasyDataViewDispatcher = /** @class */ (function (
8279
8279
  this.onSetLocation = function () {
8280
8280
  _this.setActiveView();
8281
8281
  };
8282
+ this.attach = function () {
8283
+ window.addEventListener('ed_set_location', _this.onSetLocation);
8284
+ window.addEventListener('popstate', _this.onSetLocation);
8285
+ };
8282
8286
  this.options = utils_utils.assign(this.options, options || {});
8283
8287
  if (this.options.rootEntity) {
8284
8288
  this.options.showBackToEntities = false;
@@ -8344,7 +8348,7 @@ var easy_data_view_dispatcher_EasyDataViewDispatcher = /** @class */ (function (
8344
8348
  };
8345
8349
  EasyDataViewDispatcher.prototype.run = function () {
8346
8350
  var _this = this;
8347
- window.addEventListener('ed_set_location', this.onSetLocation);
8351
+ this.attach();
8348
8352
  return this.context.loadMetaData()
8349
8353
  .then(function () {
8350
8354
  _this.setActiveView();
@@ -8368,6 +8372,7 @@ var easy_data_view_dispatcher_EasyDataViewDispatcher = /** @class */ (function (
8368
8372
  };
8369
8373
  EasyDataViewDispatcher.prototype.detach = function () {
8370
8374
  window.removeEventListener('ed_set_location', this.onSetLocation);
8375
+ window.removeEventListener('popstate', this.onSetLocation);
8371
8376
  };
8372
8377
  return EasyDataViewDispatcher;
8373
8378
  }());