Skip to content

Commit 5af5a9b

Browse files
committed
update data grid
1 parent f84df4d commit 5af5a9b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

resources/src/renderer/views/employees/indexPage.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<data-grid
44
:columnDefs="columnDefs"
55
:datasets="datasets"
6-
:withActionSpace="true"
76
>
87
<template v-slot:actions>
98
<router-link :to="{ name: 'employee.form' }" class="btn btn-primary">

resources/src/utils/common.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ export function searchToggleSuggestion() {
3232
/*
3333
Initialize context menu (rightclick)
3434
*/
35+
export const destroyContextMenu = () => {
36+
37+
}
3538
export const initContextMenu = (targetElement='main .context', contextSelector='.context-menu', callbackOnClick=undefined) => {
3639
/* helper */
3740
let hideContextMenu = (e) => {
41+
3842

39-
if (e.target.classList.contains("context")) {
43+
if (e.target.classList.contains("context") || document.querySelector(contextSelector) == null) {
4044
return false;
4145
}
4246

@@ -46,6 +50,9 @@ export const initContextMenu = (targetElement='main .context', contextSelector='
4650
return true;
4751
};
4852

53+
document.documentElement.addEventListener("click", hideContextMenu);
54+
55+
4956
document.querySelectorAll(targetElement).forEach((el) => {
5057

5158
/* add event (rightclick) every element */
@@ -86,7 +93,6 @@ export const initContextMenu = (targetElement='main .context', contextSelector='
8693
});
8794
});
8895

89-
document.documentElement.addEventListener("click", hideContextMenu);
9096
};
9197

9298

0 commit comments

Comments
 (0)