Skip to content

Commit

Permalink
refactor: remove row-key bindings from various table components
Browse files Browse the repository at this point in the history
- Eliminated the :row-key binding from multiple components including DatabaseTableDetailColumns, DatabaseTableDetailData, DatabaseTableDetailIndexes, DatabaseDetailTabConsole, GitDetailTabChanges, GitDetailTabCommits, and GitList.
- This change simplifies the template structure and enhances readability across the affected components.
  • Loading branch information
tikazyq committed Dec 23, 2024
1 parent c70bc16 commit 654c520
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ defineOptions({ name: 'ClDatabaseTableDetailColumns' });
<cl-edit-table
:loading="loading"
:key="JSON.stringify(internalTable)"
:row-key="(row: DatabaseColumn) => JSON.stringify(row)"
:columns="columnsTableColumns"
:data="columnsTableData"
:row-style="columnRowStyle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ defineOptions({ name: 'ClDatabaseTableDetailData' });
<cl-edit-table
ref="tableRef"
:key="JSON.stringify(tableData)"
:row-key="(row: DatabaseTableRow) => JSON.stringify(row)"
:columns="tableColumns"
:data="tableData"
:page="tablePagination.page"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ defineOptions({ name: 'ClDatabaseTableDetailIndexes' });
<cl-edit-table
:loading="loading"
:key="JSON.stringify(internalTable)"
:row-key="(row: DatabaseIndex) => JSON.stringify(row)"
:columns="indexesTableColumns"
:data="indexesTableData"
:row-style="indexRowStyle"
Expand All @@ -418,7 +417,6 @@ defineOptions({ name: 'ClDatabaseTableDetailIndexes' });
>
<cl-edit-table
:key="JSON.stringify([activeIndexColumnsRowIndex, activeIndexColumns])"
:row-key="(row: DatabaseIndexColumn) => JSON.stringify(row)"
:columns="activeIndexColumnsColumns"
:data="activeIndexColumnsData"
fit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ defineOptions({ name: 'ClDatabaseDetailTabConsole' });
<div class="results" v-if="activeResultsTabName === TAB_NAME_RESULTS">
<cl-table
:key="JSON.stringify(state.consoleQueryResults)"
:row-key="(row: DatabaseTableRow) => JSON.stringify(row)"
:columns="resultsColumns"
:data="resultsData"
embedded
Expand Down
4 changes: 0 additions & 4 deletions src/views/git/detail/tabs/GitDetailTabChanges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ defineOptions({ name: 'ClGitDetailTabChanges' });
ref="tableRef"
:data="tableData"
:columns="tableColumns"
:row-key="
({ path, worktree, staging }: GitChange) =>
[path, worktree, staging].join('_')
"
height="100%"
hide-footer
:border="false"
Expand Down
3 changes: 0 additions & 3 deletions src/views/git/detail/tabs/GitDetailTabCommits.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ defineOptions({ name: 'ClGitDetailTabCommits' });
<el-table-v2
:data="tableData"
:columns="tableColumns"
:row-key="
({ hash, timestamp }: GitRef) => [hash, timestamp].join('_')
"
:total="allTableData.length"
:border="false"
:width="width"
Expand Down
2 changes: 0 additions & 2 deletions src/views/git/list/GitList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const {
tableData,
tableTotal,
selectableFunction,
rowKeyFunction,
} = useGitList();
defineOptions({ name: 'ClGitList' });
Expand All @@ -18,7 +17,6 @@ defineOptions({ name: 'ClGitList' });
<template>
<cl-list-layout
class="git-list"
:row-key="rowKeyFunction"
:action-functions="actionFunctions"
:nav-actions="navActions"
:table-pagination="tablePagination"
Expand Down

0 comments on commit 654c520

Please sign in to comment.