Cancel edit rp on click outside
parent
0fa7767cfd
commit
aa33b622a5
|
@ -1,8 +1,9 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
import {formatRPDuration} from 'utils/formatting'
|
||||
import ConfirmButtons from 'src/admin/components/ConfirmButtons'
|
||||
import onClickOutside from 'react-onclickoutside'
|
||||
|
||||
export const DatabaseRow = ({
|
||||
const DatabaseRow = ({
|
||||
retentionPolicy,
|
||||
retentionPolicy: {name, duration, replication, isEditing, isDefault, isNew},
|
||||
database,
|
||||
|
@ -103,3 +104,5 @@ DatabaseRow.propTypes = {
|
|||
onCancel: func,
|
||||
onConfirm: func,
|
||||
}
|
||||
|
||||
export default onClickOutside(DatabaseRow)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
import {DatabaseRow} from 'src/admin/components/DatabaseRow'
|
||||
import DatabaseRow from 'src/admin/components/DatabaseRow'
|
||||
import ConfirmButtons from 'src/admin/components/ConfirmButtons'
|
||||
|
||||
const {
|
||||
|
@ -57,6 +57,7 @@ const DatabaseTable = ({
|
|||
onCancel={onCancelRetentionPolicy}
|
||||
onConfirm={onCreateRetentionPolicy}
|
||||
onStopEdit={onStopEditRetentionPolicy}
|
||||
handleClickOutside={() => onStopEditRetentionPolicy({database, retentionPolicy: rp})}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue