Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Save API is getting call after click on any button

default discord avatar
javascriptjunkielast year

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

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.