Skip to content

Commit 2b68850

Browse files
(compass-sidebar): fixes disconnected item retaining its expanded state when connected again COMPASS-7967 (#5944)
1 parent 09f5ca6 commit 2b68850

File tree

5 files changed

+873
-54
lines changed

5 files changed

+873
-54
lines changed

package-lock.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-sidebar/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
"redux-thunk": "^2.4.2"
7070
},
7171
"devDependencies": {
72-
"mongodb-data-service": "^22.21.0",
72+
"@mongodb-js/connection-storage": "^0.14.0",
7373
"@mongodb-js/eslint-config-compass": "^1.1.1",
7474
"@mongodb-js/mocha-config-compass": "^1.3.9",
7575
"@mongodb-js/prettier-config-compass": "^1.0.2",
76-
"@mongodb-js/connection-storage": "^0.14.0",
7776
"@mongodb-js/tsconfig-compass": "^1.0.4",
7877
"@testing-library/react": "^12.1.5",
78+
"@testing-library/react-hooks": "^7.0.2",
7979
"@testing-library/user-event": "^13.5.0",
8080
"@types/chai": "^4.2.21",
8181
"@types/chai-dom": "^0.0.10",
@@ -88,6 +88,7 @@
8888
"electron-mocha": "^12.2.0",
8989
"eslint": "^7.25.0",
9090
"mocha": "^10.2.0",
91+
"mongodb-data-service": "^22.21.0",
9192
"nyc": "^15.1.0",
9293
"prettier": "^2.7.1",
9394
"react-dom": "^17.0.2",

packages/compass-sidebar/src/components/multiple-connections/connections-navigation.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ const ConnectionsNavigation: React.FC<ConnectionsNavigationProps> = ({
202202
onCollapseAll,
203203
onConnectionToggle,
204204
onDatabaseToggle,
205-
} = useFilteredConnections(
205+
} = useFilteredConnections({
206206
connections,
207207
filterRegex,
208208
fetchAllCollections,
209-
onDatabaseExpand
210-
);
209+
onDatabaseExpand,
210+
});
211211

212212
const connectionListTitleActions =
213213
useMemo((): ItemAction<ConnectionListTitleActions>[] => {

0 commit comments

Comments
 (0)