@monoui/vuejs 1.1.34 → 1.1.36

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.34",
3
+ "version": "1.1.36",
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",
@@ -495,12 +495,7 @@ export default {
495
495
  this.addPopStateListener();
496
496
  },
497
497
  async mounted() {
498
- var filterPrefix = this.getHistoryName("f-");
499
- var sortingPrefix = this.getHistoryName("s-");
500
- let url = new URL(window.location).toString();
501
- if (url.indexOf(filterPrefix) >= 0 || url.indexOf(sortingPrefix) >= 0) {
502
- this.loadHistory();
503
- }
498
+ this.loadHistory();
504
499
  if (this.autoLoad) {
505
500
  await this.getValues();
506
501
  }
@@ -728,10 +723,12 @@ export default {
728
723
  if (filter) {
729
724
  filter.Value = value;
730
725
  } else {
731
- this.filters.push({
732
- Column: column,
733
- Value: value
734
- });
726
+ if (value) {
727
+ this.filters.push({
728
+ Column: column,
729
+ Value: value
730
+ });
731
+ }
735
732
  }
736
733
  this.getValues();
737
734
  },
@@ -883,14 +880,16 @@ export default {
883
880
  }
884
881
  },
885
882
  loadHistoryFilters() {
886
- const parameters = this.getHistoryParameters("f-");
887
- if (!parameters) return;
883
+ const filterParams = this.getHistoryParameters("f-");
884
+ if (!filterParams) return;
888
885
 
889
886
  const trimName = this.getHistoryName("f-");
890
- const names = Object.keys(parameters);
887
+ const names = Object.keys(filterParams);
888
+ if (!names || names.length == 0) return;
889
+
891
890
  this.filters.splice(0, this.filters.length);
892
891
  for (const paramName of names) {
893
- const value = parameters[paramName];
892
+ const value = filterParams[paramName];
894
893
  const column = paramName.replace(trimName, "");
895
894
  if (value) {
896
895
  this.filters.push({
@@ -901,14 +900,16 @@ export default {
901
900
  }
902
901
  },
903
902
  loadHistorySorting() {
904
- const parameters = this.getHistoryParameters("s-");
905
- if (!parameters) return;
903
+ const sortingParams = this.getHistoryParameters("s-");
904
+ if (!sortingParams) return;
906
905
 
907
906
  const trimName = this.getHistoryName("s-");
908
- const names = Object.keys(parameters);
907
+ const names = Object.keys(sortingParams);
908
+ if (!names || names.length == 0) return;
909
+
909
910
  this.sorting.splice(0, this.sorting.length);
910
911
  for (const paramName of names) {
911
- var paramValue = parameters[paramName];
912
+ var paramValue = sortingParams[paramName];
912
913
  let value = undefined;
913
914
  if (paramValue && paramValue === "1") value = true;
914
915
  else if (paramValue && paramValue === "0") value = false;