11import type { Store } from 'redux' ;
2- import { createStore , applyMiddleware } from 'redux' ;
2+ import { applyMiddleware , createStore } from 'redux' ;
33import type { IndexesThunkDispatch , RootState } from '../modules' ;
44import reducer from '../modules' ;
55import thunk from 'redux-thunk' ;
@@ -12,16 +12,16 @@ import {
1212 stopPollingRegularIndexes ,
1313} from '../modules/regular-indexes' ;
1414import {
15- fetchSearchIndexes ,
1615 createSearchIndexOpened ,
16+ fetchSearchIndexes ,
1717 stopPollingSearchIndexes ,
1818} from '../modules/search-indexes' ;
1919import type { DataService } from 'mongodb-data-service' ;
2020import type AppRegistry from 'hadron-app-registry' ;
2121import type { ActivateHelpers } from 'hadron-app-registry' ;
2222import type {
23- MongoDBInstance ,
2423 Collection ,
24+ MongoDBInstance ,
2525} from '@mongodb-js/compass-app-stores/provider' ;
2626import type { Logger } from '@mongodb-js/compass-logging' ;
2727import type { TrackFunction } from '@mongodb-js/compass-telemetry' ;
@@ -128,9 +128,13 @@ export function activateIndexesPlugin(
128128 )
129129 ) ;
130130
131- on ( localAppRegistry , 'open-create-index-modal' , ( ) => {
132- store . dispatch ( createIndexOpened ( ) ) ;
133- } ) ;
131+ on (
132+ localAppRegistry ,
133+ 'open-create-index-modal' ,
134+ ( openCreateModalRequest ?: { query : Document } ) => {
135+ store . dispatch ( createIndexOpened ( openCreateModalRequest ?. query ) ) ;
136+ }
137+ ) ;
134138
135139 on ( localAppRegistry , 'open-create-search-index-modal' , ( ) => {
136140 store . dispatch ( createSearchIndexOpened ( ) ) ;
0 commit comments