Browse Source

preventDefault for onClose.

pull/1267/head
Mr.Tone 9 years ago
parent
commit
56b0650734
  1. 3
      components/tag/index.jsx

3
components/tag/index.jsx

@ -15,6 +15,8 @@ export default class Tag extends React.Component {
}
close(e) {
this.props.onClose(e);
if(e.defaultPrevented) return;
const dom = ReactDOM.findDOMNode(this);
dom.style.width = `${dom.offsetWidth}px`;
// It's Magic Code, don't know why
@ -22,7 +24,6 @@ export default class Tag extends React.Component {
this.setState({
closing: true,
});
this.props.onClose(e);
}
animationEnd(key, existed) {

Loading…
Cancel
Save