Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dialog]option to make dialog box non-cancellable #1162 #1187

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

mogii
Copy link

@mogii mogii commented Jul 16, 2015

No description provided.

@@ -353,7 +353,7 @@ let Dialog = React.createClass({
},

_handleWindowKeyUp(e) {
if (e.keyCode === KeyCode.ESC) {
if (e.keyCode === KeyCode.ESC && this.props.modal===false ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mogii Just a small formatting change:

(e.keyCode === KeyCode.ESC && this.props.modal === false)

@@ -353,7 +353,7 @@ let Dialog = React.createClass({
},

_handleWindowKeyUp(e) {
if (e.keyCode === KeyCode.ESC) {
if (e.keyCode === KeyCode.ESC && this.props.modal === false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that you can do this instead:

(e.keyCode === KeyCode.ESC && !this.props.modal)

@hai-cea
Copy link
Member

hai-cea commented Jul 17, 2015

Thanks @mogii !

hai-cea added a commit that referenced this pull request Jul 17, 2015
[Dialog]option to make dialog box non-cancellable #1162
@hai-cea hai-cea merged commit f133473 into mui:master Jul 17, 2015
@zannager zannager added the component: dialog This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants