Skip to content

Commit

Permalink
⭐️ Open folder in new window
Browse files Browse the repository at this point in the history
⭐️ Open folder in new window
  • Loading branch information
MontaGhanmy authored Sep 5, 2023
1 parent 362b2ee commit 666f51e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ export const useOnBuildContextMenu = (children: DriveItem[], initialParentId?: s
type: 'menu',
text: Languages.t('components.item_context_menu.open_new_window'),
onClick: () => {
const route = RouterServices.generateRouteFromState({ companyId: company, viewId: item.parent_id, itemId: item.id });
const itemId = !item.is_directory ? item.id : "";
const viewId = item.is_directory ? item.id : item.parent_id;
const route = RouterServices.generateRouteFromState({ companyId: company, viewId, itemId });
window.open(route, '_blank');
window.open(route, '_blank');
}
},
Expand Down

0 comments on commit 666f51e

Please sign in to comment.