mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-01 12:22:15 +02:00
♻️ Improve removing signal listener from elements
This commit is contained in:
@ -18,13 +18,9 @@ const className= style.host(todosComponent).css`
|
||||
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](){
|
||||
console.log("zde");
|
||||
S.clear(...this.value);
|
||||
},
|
||||
remove(i){ this.value.splice(i, 1)[0]; }
|
||||
});
|
||||
console.log(todosS);
|
||||
|
||||
const name= "todoName";
|
||||
const onsubmitAdd= on("submit", event=> {
|
||||
const el= event.target.elements[name];
|
||||
|
Reference in New Issue
Block a user