1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 12:22:15 +02:00

add removeSignalsFromElements

for better auto-removing signals↔elements listeners (e.g.
provide a way to debug/investigate deps from browser inspector)
This commit is contained in:
2023-10-14 12:43:53 +02:00
parent 9f57913f8d
commit c20f5ae117
8 changed files with 623 additions and 583 deletions

View File

@ -19,8 +19,12 @@ export function todosComponent({ todos= [ "Task A" ] }= {}){
const todosS= S(todos.map(t=> S(t)), {
add(v){ this.value.push(S(v)); },
remove(i){ this.value.splice(i, 1)[0]; },
[S.symbols.onclear](){ S.clear(...this.value); },
[S.symbols.onclear](){
console.log("zde");
S.clear(...this.value);
},
});
console.log(todosS);
const name= "todoName";
const onsubmitAdd= on("submit", event=> {
const el= event.target.elements[name];