Hi all,
I've made an UI field (custom component) that manage changes of others fields.
I noticed that if I change from my custom component then move page, this unsaved warning was not appeared.
Could anyone explain what is the logic behind it? I mean to trigger that warning
Leave without saving warning in custom component
Found myself way to trigger
add this to the component's
import {useForm} from "payload/components/forms";
const {setModified} = useForm()
then in event to handle change
setModified(true)
Star
Discord
online
Get dedicated engineering support directly from the Payload team..