comand-component-library 3.1.52 → 3.1.53

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.1.52",
3
+ "version": "3.1.53",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -44,4 +44,4 @@
44
44
  "typescript": "~3.9.3",
45
45
  "vue-jest": "^5.0.0-0"
46
46
  }
47
- }
47
+ }
@@ -1,6 +1,10 @@
1
+ import {onBeforeUpdate} from "vue"
2
+
1
3
  export function useSequence() {
2
4
  const sequences = {}
3
5
 
6
+ onBeforeUpdate(resetSequence)
7
+
4
8
  function nextSequenceValue(sequenceName = "defaultSequence") {
5
9
  const currentValue = sequences[sequenceName] || 0 // get currentValue for specific sequence (else set value to 0)
6
10
  sequences[sequenceName] = currentValue + 1 // raise currentValue by 1