Arreglar error: al remover curso de MiHorario este permanecia en la tabla

master
Araozu 2021-03-28 08:34:31 -05:00
parent 72bb19c977
commit 5ce5f707a5
5 changed files with 7 additions and 6 deletions

View File

@ -92,7 +92,7 @@ export function MiHorario(props: MiHorarioProps) {
icono={"ph-trash"}
onClick={() => {}}
/>
|
|
<BotonMaxMin
fnMaximizar={fnMaximizar}
fnMinimizar={fnMinimizar}

View File

@ -194,12 +194,12 @@ export function Tabla(props: Props) {
const celdas = createMemo(() => {
// Hace reaccionar a la reactividad de Solid
props.data
const d = data()
return (
<For each={horas}>
{(hora) => (
<FilaTabla
data={data()}
data={d}
hora={hora}
tablaObserver={props.tablaObserver}
/>

View File

@ -115,7 +115,7 @@ export function CeldaFila(props: Props) {
// Limpiar los memos, porque cuando se desmonta la celda esos memos quedan sin efecto
onCleanup(() => {
props.tablaObserver.limpiar()
props.tablaObserver.limpiar(id)
})
const clases = createMemo(

View File

@ -132,6 +132,7 @@ export function FilaTabla(props: Props) {
</div>
<For each={dias}>
{(dia) => {
console.log("Renderizar dias")
const diaStr = dia.substring(0, 2)
const horaStr = hora.substring(0, 5)

View File

@ -211,7 +211,7 @@ export class TablaObserver {
})
}
limpiar() {
this.memos = {}
limpiar(id: string) {
delete this.memos[id]
}
}