Skip to content

Commit

Permalink
removed double click to make parmanent for folder item
Browse files Browse the repository at this point in the history
  • Loading branch information
naman-bruno committed Jan 22, 2025
1 parent d460688 commit f448b35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ const CollectionItem = ({ item, collection, searchText }) => {
}
};

const handleDoubleClick = (event) => {
dispatch(makeTabPermanent({ uid: item.uid }))
};

let indents = range(item.depth);
const onDropdownCreate = (ref) => (dropdownTippyRef.current = ref);
const isFolder = isItemAFolder(item);
Expand All @@ -228,6 +224,12 @@ const CollectionItem = ({ item, collection, searchText }) => {
}
}

const handleDoubleClick = (event) => {
if(!isFolder){
dispatch(makeTabPermanent({ uid: item.uid }))
}
};

// we need to sort request items by seq property
const sortRequestItems = (items = []) => {
return items.sort((a, b) => a.seq - b.seq);
Expand Down
1 change: 0 additions & 1 deletion packages/bruno-app/src/providers/ReduxStore/slices/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export const tabsSlice = createSlice({
},
makeTabPermanent: (state, action) => {
const { uid } = action.payload;
console.log(state.tabs, uid)
const tab = find(state.tabs, (t) => t.uid === uid);
if (tab) {
tab.preview = false;
Expand Down

0 comments on commit f448b35

Please sign in to comment.