@eturnity/eturnity_reusable_components 8.31.6-EPDM-16401.1-test → 8.31.6-EPDM-16401.4

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": "@eturnity/eturnity_reusable_components",
3
- "version": "8.31.6-EPDM-16401.1-test",
3
+ "version": "8.31.6-EPDM-16401.4",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -890,7 +890,6 @@
890
890
  this.searchChange('')
891
891
  },
892
892
  optionSelected(e) {
893
- console.log('option selected:',e)
894
893
  this.selectedValue = e
895
894
  this.closeDropdown()
896
895
  this.blur()
@@ -161,19 +161,24 @@
161
161
  },
162
162
  computed: {
163
163
  selectDropdownParent() {
164
- const element = this.$el?.closest('.rc-select-dropdown')
165
- // Try to get the Vue component instance
166
- return element?.__vueParentComponent?.ctx || this.$parent
164
+ // Search up the component hierarchy for the dropdown component
165
+ let parent = this.$parent
166
+ let iterations = 0
167
+ const maxIterations = 5
168
+
169
+ while (parent && iterations < maxIterations) {
170
+ if (parent.$attrs.class == 'rc-select-dropdown') {
171
+ return parent
172
+ }
173
+ parent = parent.$parent
174
+ iterations++
175
+ }
176
+
177
+ return this.$parent
167
178
  },
168
179
  },
169
180
  methods: {
170
181
  clickHandler(e) {
171
- console.log(
172
- 'clicked:',
173
- this.isDisabled,
174
- !!this.$attrs?.onClick,
175
- this.selectDropdownParent
176
- )
177
182
  if (this.isDisabled || !!this.$attrs?.onClick) {
178
183
  // prevent emitter if the option is disabled
179
184
  return