Skip to content

Instantly share code, notes, and snippets.

@helloncanella
Last active August 26, 2016 23:12
Show Gist options
  • Save helloncanella/83a6284fca99aa98fea7effea4ecd237 to your computer and use it in GitHub Desktop.
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`
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