Save API is getting call after click on any button

default discord avatar
javascriptjunkie
last month

I created a simple custom UI component for my collection to create a view with two fields and two buttons. On one button I want to call a different API and get the details and on the other button want to save details to collection. Can someone help me to understand how it works and how to solve this issue?



understood how to do it. I need to use

e.preventDefault()

in function call

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.