Skip to content

Commit

Permalink
grid의 id field의 index를 잘못 지정하는 문제 (#1799)
Browse files Browse the repository at this point in the history
* Grid > Update key binding logic to handle null idColIndex correctly

* Bump version to 3.4.70 in package.json
  • Loading branch information
jinbekim authored Nov 1, 2024
1 parent 424f8fc commit ccc1a7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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.4.69",
"version": "3.4.70",
"description": "A EXEM Library project",
"author": "exem <dev_client@ex-em.com>",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/components/grid/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
<!-- Row List -->
<template
v-for="(row, rowIndex) in viewStore"
:key="idColIndex !== -1 ? row[2][idColIndex] : rowIndex"
:key="idColIndex != null ? row[2][idColIndex] : rowIndex"
>
<tr
:data-index="row[0]"
Expand Down Expand Up @@ -425,7 +425,7 @@
<!-- Cell -->
<template
v-for="(column, cellIndex) in orderedColumns"
:key="`${idColIndex !== -1 ? row[2][idColIndex] : rowIndex}-${cellIndex}`"
:key="`${idColIndex != null ? row[2][idColIndex] : rowIndex}-${cellIndex}`"
>
<td
v-if="!column.hide && !column.hiddenDisplay"
Expand Down Expand Up @@ -1432,7 +1432,7 @@ export default {
onBeforeMount(() => initWrapperDiv());
const idColIndex = computed(() => stores.orderedColumns.findIndex(c => c.field === 'id'));
const idColIndex = computed(() => stores.orderedColumns.find(c => c.field === 'id')?.index);
return {
idColIndex,
Expand Down

0 comments on commit ccc1a7b

Please sign in to comment.