feat: Improve Contact list (#10522)

This commit is contained in:
Sivin Varghese
2024-12-03 07:53:41 +05:30
committed by GitHub
parent 86bd339a47
commit 062587487a
6 changed files with 66 additions and 40 deletions

View File

@@ -214,6 +214,10 @@ const resetValidation = () => {
v$.value.$reset();
};
const resetForm = () => {
Object.assign(state, defaultState);
};
watch(() => props.contactData, prepareStateBasedOnProps, {
immediate: true,
deep: true,
@@ -224,6 +228,7 @@ defineExpose({
state,
resetValidation,
isFormInvalid,
resetForm,
});
</script>
@@ -261,7 +266,7 @@ defineExpose({
:placeholder="item.placeholder"
:message-type="getMessageType(item.key)"
:custom-input-class="`h-8 !pt-1 !pb-1 ${
!isDetailsView ? '[&:not(.error)]:!border-transparent' : ''
!isDetailsView ? '[&:not(.error,.focus)]:!border-transparent' : ''
}`"
class="w-full"
@input="