correjidos componentesw para usar el enter como submit
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
onclick={onClose}
|
||||
></button>
|
||||
</div>
|
||||
<form onsubmit={(e) => handleSubmit(e)}>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<h6>Grupos:</h6>
|
||||
@@ -99,10 +100,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<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
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user