Browse Source

Fix tag animation

pull/2202/head
afc163 9 years ago
parent
commit
706ae5a5b8
  1. 2
      components/alert/index.jsx
  2. 5
      components/tag/index.jsx

2
components/alert/index.jsx

@ -29,7 +29,7 @@ export default class Alert extends React.Component {
this.setState({
closing: false,
});
this.props.onClose.call(this, e);
this.props.onClose(e);
}
animationEnd = () => {
this.setState({

5
components/tag/index.jsx

@ -25,10 +25,9 @@ export default class Tag extends React.Component {
this.props.onClose(e);
if (e.defaultPrevented) return;
const dom = ReactDOM.findDOMNode(this);
const domWidth = dom.getBoundingClientRect().width;
dom.style.width = `${domWidth}px`;
dom.style.width = `${dom.getBoundingClientRect().width}px`;
// It's Magic Code, don't know why
dom.style.width = `${domWidth}px`;
dom.style.width = `${dom.getBoundingClientRect().width}px`;
this.setState({
closing: true,
});

Loading…
Cancel
Save