Skip to content

Commit

Permalink
fix(editor): 🐛 Fix item list delete
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 9, 2022
1 parent 97ba29f commit c5ffd8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/builder/components/shared/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ export const TableList = <T,>({
}

const deleteItem = (itemIndex: number) => () => {
items.splice(itemIndex, 1)
setItems([...items])
onItemsChange([...items])
const newItems = [...items]
newItems.splice(itemIndex, 1)
setItems([...newItems])
onItemsChange([...newItems])
}

const handleMouseEnter = (itemIndex: number) => () =>
Expand Down

4 comments on commit c5ffd8c

@vercel
Copy link

@vercel vercel bot commented on c5ffd8c Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on c5ffd8c Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on c5ffd8c Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on c5ffd8c Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.