File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
- import React , { useContext , useState } from 'react'
1
+ import React , { SyntheticEvent , useContext , useState } from 'react'
2
2
import { useHistory , useLocation , useParams } from 'react-router-dom'
3
3
import { Modal } from '@devtron-labs/devtron-fe-common-lib'
4
4
import PageHeader from '../PageHeader'
@@ -17,7 +17,10 @@ export default function HeaderWithCreateButton({ headerName, isSuperAdmin }) {
17
17
const { serverMode } = useContext ( mainContext )
18
18
const [ showCreateSelectionModal , setShowCreateSelectionModal ] = useState ( false )
19
19
20
- const handleCreateButton = ( ) => {
20
+ const handleCreateButton = ( e ?: SyntheticEvent ) => {
21
+ // This is added to prevent the further propagation of the event
22
+ // It was causing issues with the react select dropdown
23
+ e ?. stopPropagation ( )
21
24
setShowCreateSelectionModal ( ( prevState ) => ! prevState )
22
25
}
23
26
You can’t perform that action at this time.
0 commit comments