mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
fix(admin): handle click if specified #1257
This commit is contained in:
parent
0a9fff5a30
commit
6ddafb4fe3
@ -16,9 +16,11 @@ function Ico(props) {
|
||||
}
|
||||
|
||||
const handleClick = (e, onClick) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClick(e);
|
||||
if (onClick) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClick(e);
|
||||
}
|
||||
};
|
||||
|
||||
Ico.propTypes = {
|
||||
|
@ -82,7 +82,7 @@ class TableRow extends React.Component {
|
||||
|
||||
cells.push(
|
||||
<td key='action' className={styles.actions}>
|
||||
<IcoContainer icons={[{ icoType: 'pencil' }, { id: this.props.record.id, icoType: 'trash', onClick: this.props.onDelete }]} />
|
||||
<IcoContainer icons={[{ icoType: 'pencil', onClick: false }, { id: this.props.record.id, icoType: 'trash', onClick: this.props.onDelete }]} />
|
||||
</td>
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user