Skip to content

Commit

Permalink
WIP Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
amengus87 committed Aug 29, 2024
1 parent 4537a67 commit ea12078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/hooks/common/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ export function useTableOperate<T extends TableData = TableData>(data: Ref<T[]>,
/** the editing row data */
const editingData: Ref<T | null> = ref(null);

function handleEdit(id: T['id']) {
function handleEdit(uuid: T['uuid']) {
operateType.value = 'edit';
const findItem = data.value.find(item => item.id === id) || null;
const findItem = data.value.find(item => item.uuid === uuid) || null;
editingData.value = cloneDeep(findItem);

openDrawer();
Expand Down

0 comments on commit ea12078

Please sign in to comment.