Skip to content

Commit

Permalink
[#1152] Grid > ContextMenu 관련 에러로그 발생 (#1153)
Browse files Browse the repository at this point in the history
Co-authored-by: yell <yell@ex-em.com>
  • Loading branch information
kimyell and kimyell1023 authored Apr 26, 2022
1 parent e778984 commit 604395e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evui",
"version": "3.3.16",
"version": "3.3.17",
"description": "A EXEM Library project",
"author": "exem <dev_client@ex-em.com>",
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions src/components/grid/uses.js
Original file line number Diff line number Diff line change
Expand Up @@ -874,12 +874,14 @@ export const contextMenuEvent = (params) => {
} else {
rowIndex = target.parentElement.parentElement.dataset.index;
}

let clickedRow;
if (rowIndex) {
const rowData = stores.viewStore[+rowIndex][ROW_DATA_INDEX];
selectInfo.selectedRow = rowData;
clickedRow = stores.viewStore.find(row => row[ROW_INDEX] === +rowIndex)?.[ROW_DATA_INDEX];
}
if (clickedRow) {
selectInfo.selectedRow = clickedRow;
setContextMenu();
emit('update:selected', rowData);
emit('update:selected', clickedRow);
} else {
selectInfo.selectedRow = [];
setContextMenu(false);
Expand Down

0 comments on commit 604395e

Please sign in to comment.