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">
|
<div className="flex justify-start delete">
|
||||||
<button
|
<button
|
||||||
className="button small icon-only danger"
|
className="button small icon-only danger"
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
dispatch({ type: 'removeTypeDeChamp', params: { typeDeChamp } })
|
if (confirm('Êtes vous sûr de vouloir supprimer ce champ ?'))
|
||||||
}
|
dispatch({
|
||||||
|
type: 'removeTypeDeChamp',
|
||||||
|
params: { typeDeChamp }
|
||||||
|
});
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon="trash" title="Supprimer" />
|
<FontAwesomeIcon icon="trash" title="Supprimer" />
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue