Skip to content

Commit

Permalink
Merge pull request #1375 from Johann-S/fix/create-group
Browse files Browse the repository at this point in the history
fix(groups): allow to create a group with no parent
  • Loading branch information
perry-mitchell authored Sep 8, 2024
2 parents 7ca0126 + c540c01 commit aa914b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions source/renderer/components/vault/GroupsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ export const GroupsList = () => {
if (groupEditID !== null && groupEditID !== -1) {
onRenameGroup(groupEditID, newGroupName);
} else {
if (!parentGroupID) {
throw new Error("No parent ID specified");
}
onCreateGroup(parentGroupID, newGroupName);
}
closeEditDialog();
Expand Down
2 changes: 1 addition & 1 deletion source/renderer/components/vault/VaultContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface VaultContextState {

batchDeleteItems: (action: { groupIDs?: Array<GroupID>; entryIDs?: Array<EntryID>; }) => void;
onCollapseGroup: (group: GroupTreeNodeInfo) => void;
onCreateGroup: (parentID: GroupID, groupTitle: string) => void;
onCreateGroup: (parentID: GroupID | null, groupTitle: string) => void;
onExpandGroup: (group: GroupTreeNodeInfo) => void;
onSelectGroup: (groupID: GroupID | null) => void;
onGroupFilterTermChange: (term: string) => void;
Expand Down

0 comments on commit aa914b7

Please sign in to comment.