From 181de6c9a1a1c57e9c63b7960e944d5128a1f3f8 Mon Sep 17 00:00:00 2001 From: Abhishiv Saxena Date: Mon, 24 Jun 2024 19:54:57 +0300 Subject: [PATCH] fixed pop in Each component --- examples/kitchen-sink/src/index.tsx | 19 ++++++++++++++----- src/stdlib/Each/index.tsx | 10 ++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/examples/kitchen-sink/src/index.tsx b/examples/kitchen-sink/src/index.tsx index a5aed2a..818fb8f 100644 --- a/examples/kitchen-sink/src/index.tsx +++ b/examples/kitchen-sink/src/index.tsx @@ -83,13 +83,25 @@ export const Todos = component("Todos", (props, { signal, wire, store }) => { style="width: 100%; max-width: 400px;" /> + { + e.preventDefault(); + produce($todos.items, (items) => { + //items.splice(0, 0, json); + items.pop(); + }); + }} + > + remove first(pop) +