Skip to content

Commit

Permalink
removing id
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Jul 21, 2022
1 parent f9fa53b commit f8417b9
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions src/components/reducers/DatabaseDispatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,11 @@ export function databaseReducer(state: TableDataType, action: any) {
...rowRecord.frontmatter,
...rowRecord.inline,
...metadata,
id: state.view.rows.length + 1,
__note__: new NoteInfo(
{
...rowRecord.frontmatter,
...rowRecord.inline,
file: { path: filename },
},
state.view.rows.length + 1
),
__note__: new NoteInfo({
...rowRecord.frontmatter,
...rowRecord.inline,
file: { path: filename },
}),
[MetadataColumns.FILE]: `[[${filename}|${action.filename}]]`,
};
// TODO add typing
Expand Down Expand Up @@ -438,15 +434,12 @@ export function databaseReducer(state: TableDataType, action: any) {
? `${state.view.file.parent.path}/${action.value}/${action.file.name}`
: `${state.view.file.parent.path}/${action.file.name}`;

action.row.original.__note__ = new NoteInfo(
{
...action.row,
file: {
path: auxPath,
},
action.row.original.__note__ = new NoteInfo({
...action.row,
file: {
path: auxPath,
},
action.row.index
);
});
// Update original cell value
const update_option_cell_index = state.columns.findIndex(
(column) => column.id === action.columnId
Expand Down

0 comments on commit f8417b9

Please sign in to comment.