Skip to content

Commit

Permalink
fix: Hide history modal if item clicked.
Browse files Browse the repository at this point in the history
  • Loading branch information
leoliu committed Jun 2, 2020
1 parent a651829 commit c519edb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/History/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default class Card extends Component {
}

render() {
const { data } = this.props
const { data, onClick } = this.props
return (
<Link to={data.url}>
<Link to={data.url} onClick={onClick}>
<Text
icon={this.getIcon()}
title={data.name}
Expand Down
2 changes: 1 addition & 1 deletion src/components/History/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class History extends Component {
) : (
<div className={styles.histories}>
{histories.map(item => (
<Card key={item.url} data={item} />
<Card key={item.url} data={item} onClick={this.handleCancel} />
))}
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions src/components/History/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.portal {
:global .ReactModal__Overlay--after-open {
background-color: transparent !important;
z-index: 2001 !important;
}
}

Expand Down

0 comments on commit c519edb

Please sign in to comment.