Last active
August 26, 2016 23:12
-
-
Save helloncanella/83a6284fca99aa98fea7effea4ecd237 to your computer and use it in GitHub Desktop.
The attribute `iconElementLeft` isn't working. The desired action is triggered just when the `<IconButton>` receives the attribute `onTouchTap`
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
import * as React from 'react' | |
import { AppBar, FontIcon, IconButton } from 'material-ui' | |
import {browserHistory} from 'react-router' | |
function _backHistory(){ | |
console.log('hello') | |
alert('hello') | |
browserHistory.push('./home') | |
} | |
export default class InstructorDetails extends React.Component<{},{}>{ | |
render(){ | |
return ( | |
<div className="instructorDetails"> | |
<AppBar | |
title="Detalhes" | |
onLeftIconButtonTouchTap={_backHistory} | |
onTitleTouchTap={_backHistory} | |
iconElementLeft={ | |
<IconButton onTouchTap={_backHistory}> | |
<FontIcon className="fa fa-arrow-left"></FontIcon> | |
</IconButton> | |
} | |
></AppBar> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment