forked from pgadmin-org/pgadmin4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues found during Electron testing. pgadmin-org#7494
Fix application crash when using users dialog. pgadmin-org#7607
- Loading branch information
1 parent
dcfef15
commit 760e382
Showing
10 changed files
with
135 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
web/pgadmin/tools/erd/static/js/erd_tool/components/BeforeUnload.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { useBeforeUnload } from '../../../../../../static/js/custom_hooks'; | ||
|
||
export default function BeforeUnload({enabled, isNewTab, beforeClose, closePanel, getForceClose}) { | ||
const {forceClose} = useBeforeUnload( | ||
{enabled, isNewTab, beforeClose, closePanel} | ||
); | ||
|
||
getForceClose(forceClose); | ||
|
||
return <></>; | ||
} | ||
|
||
BeforeUnload.propTypes = { | ||
enabled: PropTypes.bool, | ||
isNewTab: PropTypes.bool, | ||
beforeClose: PropTypes.func, | ||
closePanel: PropTypes.func, | ||
getForceClose: PropTypes.func, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.