formkit / formkit

Vue Forms ⚡️ Supercharged

Home Page:https://formkit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom @remove-icon-click function doesn't override native remove handler

Lazerproof opened this issue · comments

Reproduction

https://formkit.link/7c490f564ab10f93d75482d4651ccc31

Describe the bug

Hi.
I want to show a confirmation modal before the deletion of an item from the repeater field. I supposed that I could accomplish it by setting a custom handler for the 'removeIconClick' event, but, while the custom handle function gets called, the native event handler also gets called.

Environment

• OS: [e.g. iOS] Win 11
• Browser [e.g. chrome, safari] Chrome 123.0.6312.122
• Version [e.g. 22] Playground 1.6.x

@Lazerproof Hey there! Here's a solution I came up with: https://formkit.link/b979ebf86564e5c47ec870bcc2e10a25. Maybe someone else on the team can jump in with something easier.

You could also use a plugin to add this globally https://formkit.link/e7083085fc70cc528addb4b118b54276.

@Lazerproof I'm going to close this for now. Feel free to reopen/comment back if you have any issues/questions.