Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit f8417b9

Browse files
committed
removing id
1 parent f9fa53b commit f8417b9

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

src/components/reducers/DatabaseDispatch.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,11 @@ export function databaseReducer(state: TableDataType, action: any) {
9191
...rowRecord.frontmatter,
9292
...rowRecord.inline,
9393
...metadata,
94-
id: state.view.rows.length + 1,
95-
__note__: new NoteInfo(
96-
{
97-
...rowRecord.frontmatter,
98-
...rowRecord.inline,
99-
file: { path: filename },
100-
},
101-
state.view.rows.length + 1
102-
),
94+
__note__: new NoteInfo({
95+
...rowRecord.frontmatter,
96+
...rowRecord.inline,
97+
file: { path: filename },
98+
}),
10399
[MetadataColumns.FILE]: `[[${filename}|${action.filename}]]`,
104100
};
105101
// TODO add typing
@@ -438,15 +434,12 @@ export function databaseReducer(state: TableDataType, action: any) {
438434
? `${state.view.file.parent.path}/${action.value}/${action.file.name}`
439435
: `${state.view.file.parent.path}/${action.file.name}`;
440436

441-
action.row.original.__note__ = new NoteInfo(
442-
{
443-
...action.row,
444-
file: {
445-
path: auxPath,
446-
},
437+
action.row.original.__note__ = new NoteInfo({
438+
...action.row,
439+
file: {
440+
path: auxPath,
447441
},
448-
action.row.index
449-
);
442+
});
450443
// Update original cell value
451444
const update_option_cell_index = state.columns.findIndex(
452445
(column) => column.id === action.columnId

0 commit comments

Comments
 (0)