correjidos componentesw para usar el enter como submit
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
onclick={onClose}
|
onclick={onClose}
|
||||||
></button>
|
></button>
|
||||||
</div>
|
</div>
|
||||||
|
<form onsubmit={(e) => handleSubmit(e)}>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h6>Grupos:</h6>
|
<h6>Grupos:</h6>
|
||||||
@@ -99,10 +100,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer d-flex justify-content-center">
|
<div class="modal-footer d-flex justify-content-center">
|
||||||
<button class="btn btn-primary w-100" onclick={handleSubmit}
|
<button class="btn btn-primary w-100" type="submit"
|
||||||
>Guardar</button
|
>Guardar</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
let remaining: number = $state(25);
|
let remaining: number = $state(25);
|
||||||
const ogdesc: string = permiso.descripcion;
|
const ogdesc: string = permiso.descripcion;
|
||||||
|
|
||||||
function saveChanges() {
|
function saveChanges(e:Event) {
|
||||||
|
e.preventDefault();
|
||||||
onSubmit(permiso);
|
onSubmit(permiso);
|
||||||
onClose(ogdesc);
|
onClose(ogdesc);
|
||||||
}
|
}
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
onclick={() => onClose(ogdesc)}
|
onclick={() => onClose(ogdesc)}
|
||||||
></button>
|
></button>
|
||||||
</div>
|
</div>
|
||||||
|
<form onsubmit={(e)=>saveChanges(e)}>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="textInput" class="form-label">Descripcion</label
|
<label for="textInput" class="form-label">Descripcion</label
|
||||||
@@ -75,11 +77,12 @@
|
|||||||
onclick={() => onClose(ogdesc)}>Cerrar</button
|
onclick={() => onClose(ogdesc)}>Cerrar</button
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="submit"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
onclick={saveChanges}>Guardar</button
|
>Guardar</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user