@policystudio/policy-studio-ui-vue 1.1.91 → 1.1.93

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": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <button
3
- @click="onClick()"
3
+ @click="onClick($event)"
4
4
  @mouseenter="onMouseEnter"
5
5
  @mouseleave="onMouseLeave"
6
6
  class='psui-el-button'
@@ -93,9 +93,9 @@ export default {
93
93
  },
94
94
  },
95
95
  methods: {
96
- onClick() {
96
+ onClick(event) {
97
97
  if (this.disabled) return
98
- this.$emit('click')
98
+ this.$emit('click',event)
99
99
  },
100
100
  onMouseEnter(){
101
101
  if(!this.disabled){
@@ -8,14 +8,14 @@
8
8
  <div
9
9
  ref="PSDropdownTrigger"
10
10
  v-if="$slots.dropdownTrigger"
11
- @click="show && !toggleWhenActive ? '' : toggle()"
11
+ @click="show && !toggleWhenActive ? '' : toggle($event)"
12
12
  >
13
13
  <slot name="dropdownTrigger"></slot>
14
14
  </div>
15
15
 
16
16
  <button
17
17
  v-else
18
- @click="show && !toggleWhenActive ? '' : toggle()"
18
+ @click="show && !toggleWhenActive ? '' : toggle($event)"
19
19
  type="button"
20
20
  :id="id"
21
21
  aria-haspopup="true"
@@ -108,7 +108,7 @@ export default {
108
108
  this.unwatchParentScrolling()
109
109
  },
110
110
  methods: {
111
- toggle() {
111
+ toggle(event) {
112
112
  if (this.disabled) return
113
113
 
114
114
  if (!this.show) {
@@ -116,6 +116,7 @@ export default {
116
116
  } else {
117
117
  this.close()
118
118
  }
119
+ event.stopPropagation()
119
120
  },
120
121
  watchParentScrolling() {
121
122
  this.scrollableParentEl = getParentScrollableEl(this.$refs.PSDropdown)