evui 3.3.38 → 3.3.39

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": "evui",
3
- "version": "3.3.38",
3
+ "version": "3.3.39",
4
4
  "description": "A EXEM Library project",
5
5
  "author": "exem <dev_client@ex-em.com>",
6
6
  "license": "MIT",
@@ -871,18 +871,13 @@ export const contextMenuEvent = (params) => {
871
871
  */
872
872
  const onContextMenu = (event) => {
873
873
  const target = event.target;
874
- const tagName = target.tagName.toLowerCase();
875
- let rowIndex;
874
+ const rowIndex = target.closest('.row').dataset.index;
876
875
 
877
- if (tagName === 'td') {
878
- rowIndex = target.parentElement.dataset.index;
879
- } else {
880
- rowIndex = target.parentElement.parentElement.dataset.index;
881
- }
882
876
  let clickedRow;
883
877
  if (rowIndex) {
884
878
  clickedRow = stores.viewStore.find(row => row[ROW_INDEX] === +rowIndex)?.[ROW_DATA_INDEX];
885
879
  }
880
+
886
881
  if (clickedRow) {
887
882
  selectInfo.selectedRow = clickedRow;
888
883
  setContextMenu();
@@ -599,7 +599,7 @@ export const contextMenuEvent = (params) => {
599
599
  */
600
600
  const onContextMenu = (event) => {
601
601
  const target = event.target;
602
- const rowIndex = target.parentElement.dataset.index;
602
+ const rowIndex = target.closest('.row').dataset.index;
603
603
 
604
604
  if (rowIndex) {
605
605
  const index = stores.viewStore.findIndex(v => v.index === Number(rowIndex));