@eturnity/eturnity_reusable_components 1.2.42 → 1.2.43

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": "1.2.42",
3
+ "version": "1.2.43",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -279,6 +279,9 @@ const InputWrapper = styled('div', inputAttrs)`
279
279
  mounted(){
280
280
  this.selectedValue=this.value
281
281
  },
282
+ beforeDestroy(){
283
+ document.removeEventListener('click', this.clickOutside)
284
+ },
282
285
  methods:{
283
286
  focus(){
284
287
  this.isActive=true
@@ -290,7 +293,7 @@ const InputWrapper = styled('div', inputAttrs)`
290
293
  if(this.isSearchBarVisible){return}
291
294
  this.isDropdownOpen=!this.isDropdownOpen
292
295
  if (this.isDropdownOpen) {
293
- setTimeout(()=>document.addEventListener('click', this.clickOutside),10)
296
+ document.addEventListener('click', this.clickOutside)
294
297
  } else {
295
298
  document.removeEventListener('click', this.clickOutside)
296
299
  }
@@ -299,7 +302,7 @@ const InputWrapper = styled('div', inputAttrs)`
299
302
  openDropdown(){
300
303
  this.focus()
301
304
  this.isDropdownOpen=true
302
- setTimeout(()=>document.addEventListener('click', this.clickOutside),10)
305
+ document.addEventListener('click', this.clickOutside)
303
306
  },
304
307
  closeDropdown(){
305
308
  this.blur()