Merge pull request #4139 from Keirua/fix/confirm-on-delete-champ
#4137 - Ajout d'un confirm à la suppression d'un champ
This commit is contained in:
commit
6f3fde21f2
3 changed files with 17 additions and 7 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…
Add table
Add a link
Reference in a new issue