@monoui/vuejs 1.1.81 → 1.1.83

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoui/vuejs",
3
- "version": "1.1.81",
3
+ "version": "1.1.83",
4
4
  "description": "This project will contain MonoFor UI Framework",
5
5
  "main": "./dist/main.js",
6
6
  "repository": "git@gitlab.com:monoui/vuejs.git",
@@ -77,7 +77,8 @@
77
77
  :key="'time-frame-' + opt"
78
78
  @click.stop="
79
79
  applyTimeFrameFilter(
80
- opt
80
+ opt,
81
+ true
81
82
  )
82
83
  "
83
84
  >
@@ -97,7 +98,8 @@
97
98
  <b-dropdown-item
98
99
  @click.stop="
99
100
  applyTimeFrameFilter(
100
- 'Clear'
101
+ 'Clear',
102
+ true
101
103
  )
102
104
  "
103
105
  >
@@ -328,7 +330,7 @@
328
330
  class="ml-2 mr-2"
329
331
  @click="refresh"
330
332
  >
331
- <i class="fas fa-sync"></i>
333
+ <i class="fas fa-sync mr-1"></i>
332
334
  Refresh
333
335
  <span v-show="settings.totalItemCount">
334
336
  | {{ settings.totalItemCount }} Rows
@@ -657,6 +659,9 @@ export default {
657
659
  created() {
658
660
  this.addPopStateListener();
659
661
  },
662
+ beforeDestroy() {
663
+ this.removePopStateListener();
664
+ },
660
665
  async mounted() {
661
666
  if (this.history) this.loadHistory();
662
667
 
@@ -698,7 +703,7 @@ export default {
698
703
  return lbl < 10 ? `\u00A0${lbl} months` : `${lbl} months`;
699
704
  },
700
705
 
701
- applyTimeFrameFilter(opt) {
706
+ applyTimeFrameFilter(opt, load = false) {
702
707
  const existingIndex = this.filters.findIndex(
703
708
  f => f.Column === this.finalTimeFrame.column
704
709
  );
@@ -727,7 +732,9 @@ export default {
727
732
  }
728
733
  }
729
734
 
730
- this.getValues();
735
+ if (load) {
736
+ this.getValues();
737
+ }
731
738
  },
732
739
 
733
740
  calculateStartDate(months) {
@@ -781,6 +788,8 @@ export default {
781
788
  window.removeEventListener("popstate", this.popStateEvent);
782
789
  },
783
790
  async popStateEvent() {
791
+ if (!this.history) return;
792
+
784
793
  this.comingFromPopState = true;
785
794
  this.loadHistory();
786
795
  this.getValues(false);