correjidos componentesw para usar el enter como submit

This commit is contained in:
2025-07-17 00:16:28 -03:00
parent e7b2115d6f
commit eceefba391
2 changed files with 9 additions and 4 deletions
@@ -18,7 +18,8 @@
let remaining: number = $state(25);
const ogdesc: string = permiso.descripcion;
function saveChanges() {
function saveChanges(e:Event) {
e.preventDefault();
onSubmit(permiso);
onClose(ogdesc);
}
@@ -51,6 +52,7 @@
onclick={() => onClose(ogdesc)}
></button>
</div>
<form onsubmit={(e)=>saveChanges(e)}>
<div class="modal-body">
<div class="mb-3">
<label for="textInput" class="form-label">Descripcion</label
@@ -75,11 +77,12 @@
onclick={() => onClose(ogdesc)}>Cerrar</button
>
<button
type="button"
type="submit"
class="btn btn-primary"
onclick={saveChanges}>Guardar</button
>Guardar</button
>
</div>
</form>
</div>
</div>
</div>