Fix:Multi select dropdown menus overflow and update on scroll,Fix: Batch edit only submit updates that were made #222

This commit is contained in:
advplyr 2021-12-06 17:55:43 -06:00
parent c17af1fc28
commit fde6700a82
5 changed files with 95 additions and 48 deletions

View file

@ -103,9 +103,12 @@ export default {
},
closeMenu() {
this.showMenu = false
this.removeListener()
},
clickWrapper() {
this.showMenu = !this.showMenu
if (this.showMenu) this.setListener()
else this.removeListener()
},
removeItem(itemValue) {
var remaining = this.selected.filter((i) => i !== itemValue)
@ -113,6 +116,15 @@ export default {
this.$nextTick(() => {
this.recalcMenuPos()
})
},
scroll() {
this.recalcMenuPos()
},
setListener() {
document.addEventListener('scroll', this.scroll, true)
},
removeListener() {
document.removeEventListener('scroll', this.scroll, true)
}
},
mounted() {}