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

[EnhancedSwitch] Remove window-listenable mixin #3307

Merged
merged 1 commit into from
Feb 12, 2016

Conversation

newoga
Copy link
Contributor

@newoga newoga commented Feb 12, 2016

No description provided.

@alitaheri
Copy link
Member

I'm loving this 😍 😍 👍

@newoga
Copy link
Contributor Author

newoga commented Feb 12, 2016

Yeah @oliviertassinari's component is making this really easy. 👍

@@ -187,11 +183,6 @@ const EnhancedSwitch = React.createClass({
window.removeEventListener('resize', this._handleResize);
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the <EventListener /> for the resize event 😄?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Didn't realize this component was using the mixin and doing it manually!

@oliviertassinari oliviertassinari added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed PR: Needs Review labels Feb 12, 2016
@newoga newoga added PR: Needs Review and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 12, 2016
@newoga
Copy link
Contributor Author

newoga commented Feb 12, 2016

  • Replaced manual resize event handler with onResize prop on EventListener

@oliviertassinari
Copy link
Member

Yeah @oliviertassinari's component is making this really easy

I'm glad it's helping 😄. For the record, I needed it to listen for some cordova events:

<EventListener elementName="document" onBackButton={this.handleBackButton} />

@newoga Thanks!

oliviertassinari added a commit that referenced this pull request Feb 12, 2016
[EnhancedSwitch] Remove window-listenable mixin
@oliviertassinari oliviertassinari merged commit 8df50a5 into mui:master Feb 12, 2016
@newoga newoga deleted the #3305/enhanced-switch branch February 13, 2016 17:09
@zannager zannager added the component: switch This is the name of the generic UI component, not the React module! label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: switch 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.

4 participants