ajout d'un confirm à la suppression d'un champ
This commit is contained in:
parent
f190afd98d
commit
caa90613fd
1 changed files with 7 additions and 3 deletions
|
@ -68,9 +68,13 @@ const TypeDeChamp = sortableElement(
|
|||
<div className="flex justify-start delete">
|
||||
<button
|
||||
className="button small icon-only danger"
|
||||
onClick={() =>
|
||||
dispatch({ type: 'removeTypeDeChamp', params: { typeDeChamp } })
|
||||
}
|
||||
onClick={() => {
|
||||
if (confirm('Êtes vous sûr de vouloir supprimer ce champ ?'))
|
||||
dispatch({
|
||||
type: 'removeTypeDeChamp',
|
||||
params: { typeDeChamp }
|
||||
});
|
||||
}}
|
||||
>
|
||||
<FontAwesomeIcon icon="trash" title="Supprimer" />
|
||||
</button>
|
||||
|
|
Loading…
Reference in a new issue