improvement: Template modal should close on esc key (#2043)

* Added onKeyPressed fn

* removed key press listener
This commit is contained in:
Muhsin Shah C P 2022-01-31 21:04:38 +05:30 committed by GitHub
parent f26897f6c6
commit 2ff094d787
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -601,6 +601,7 @@ class HomePage extends React.Component {
</div>
<TemplateLibraryModal
show={this.state.showTemplateLibraryModal}
onHide={() => this.setState({ showTemplateLibraryModal: false })}
onCloseButtonClick={() => this.setState({ showTemplateLibraryModal: false })}
darkMode={this.props.darkMode}
/>