Fix Dashboard delete button
Nothing was being passed in, also moved the closure to where the function is definedpull/3103/head
parent
d18cbb15e1
commit
35203da2db
|
@ -36,9 +36,6 @@ const DashboardsTable = ({
|
|||
onCloneDashboard,
|
||||
dashboardLink,
|
||||
}) => {
|
||||
const wrappedDelete = dashboard => () => {
|
||||
onDeleteDashboard(dashboard)
|
||||
}
|
||||
return dashboards && dashboards.length ? (
|
||||
<table className="table v-center admin-table table-highlight">
|
||||
<thead>
|
||||
|
@ -80,7 +77,7 @@ const DashboardsTable = ({
|
|||
Clone
|
||||
</button>
|
||||
<ConfirmButton
|
||||
confirmAction={wrappedDelete}
|
||||
confirmAction={onDeleteDashboard(dashboard)}
|
||||
size="btn-xs"
|
||||
type="btn-danger"
|
||||
text="Delete"
|
||||
|
|
|
@ -28,7 +28,7 @@ class DashboardsPage extends Component {
|
|||
createDashboard({...dashboard, name: `${dashboard.name} (Clone)`})
|
||||
}
|
||||
|
||||
handleDeleteDashboard = dashboard => {
|
||||
handleDeleteDashboard = dashboard => () => {
|
||||
this.props.handleDeleteDashboard(dashboard)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue