Skip to content

Commit

Permalink
feat: optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
杨国璇 committed Dec 16, 2024
1 parent 560d3a1 commit 182de15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/metadata/hooks/metadata-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const MetadataViewProvider = ({
}, [storeRef]);

const modifyRecords = (rowIds, idRowUpdates, idOriginalRowUpdates, idOldRowData, idOriginalOldRowData, isCopyPaste = false, { success_callback, fail_callback } = {}) => {
const isRename = storeRef.current.record.checkIsRenameFileOperator(rowIds, idOriginalRowUpdates);
const isRename = storeRef.current.checkIsRenameFileOperator(rowIds, idOriginalRowUpdates);
let newName = null;
if (isRename) {
const rowId = rowIds[0];
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/metadata/views/kanban/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Kanban = () => {

const columns = useMemo(() => metadata.view.columns, [metadata.view.columns]);

const modifyRecord = useCallback((rowId, updates, oldRowData, originalUpdates, originalOldRowData, { success_callback }) => {
const modifyRecord = useCallback((rowId, updates, oldRowData, originalUpdates, originalOldRowData, { success_callback } = {}) => {
modifyRecordAPI(rowId, updates, oldRowData, originalUpdates, originalOldRowData, false, { success_callback });
}, [modifyRecordAPI]);

Expand Down

0 comments on commit 182de15

Please sign in to comment.