I am getting data from db by onMounted hook and showing object in a form. When user clicks to save, I just want to check if object data has changed or not.
onMounted(async () => {
loadingBasic.value = true
const doc = await getDocument('workspaces',props.uid) //doc is ref({}) also
wspace.value = doc.value
loadingBasic.value = false
})
I created a readonly object but when wspace object has changed, readonly object is changing, too. How can I create an unchanged initial copy of a ref object?
By the way, is there another easy way to check form changes?