fix: resolve ContactInputForm v-model binding and lint errors

Fix ContactInputForm v-model binding issue that was causing "no contact info" error
when adding contacts. The component was using incorrect prop name for v-model.

**Changes:**
- Update ContactInputForm to use standard `modelValue` prop instead of `input`
- Fix v-model binding by using `update:modelValue` event emission
- Remove unused `Model` import from vue-facing-decorator
- Replace `@ts-ignore` with `@ts-expect-error` in ShareMyContactInfoView

**Fixes:**
- Contact input field now properly updates parent component state
- Eliminates "There was no contact info to add" error when DID is entered
- Resolves Vue 3 v-model compatibility issues
- Clears remaining lint errors

**Testing:**
- Contact form should now accept DID input and process it correctly
- v-model binding works as expected between ContactInputForm and ContactsView
This commit is contained in:
Matthew Raymer
2025-07-17 07:43:22 +00:00
parent 214832b651
commit 902116a990
6 changed files with 75 additions and 25 deletions

View File

@@ -64,7 +64,7 @@
</template>
<script lang="ts">
import { Component, Vue, Prop, Model } from "vue-facing-decorator";
import { Component, Vue, Prop } from "vue-facing-decorator";
/**
* ContactInputForm - Contact input form component
@@ -76,23 +76,29 @@ import { Component, Vue, Prop, Model } from "vue-facing-decorator";
*/
@Component({
name: "ContactInputForm",
emits: [
"submit",
"show-onboard-meeting",
"registration-required",
"navigate-onboard-meeting",
"qr-scan",
"update:modelValue",
],
})
export default class ContactInputForm extends Vue {
@Prop({ required: true }) isRegistered!: boolean;
@Model("input", { type: String, default: "" })
inputValue!: string;
@Prop({ type: String, default: "" }) modelValue!: string;
/**
* Update the input value and emit change event
* Computed property for v-model binding
*/
set input(value: string) {
this.inputValue = value;
this.$emit("input", value);
get inputValue(): string {
return this.modelValue;
}
get input(): string {
return this.inputValue;
set inputValue(value: string) {
this.$emit("update:modelValue", value);
}
}
</script>

View File

@@ -77,9 +77,9 @@ export default class ShareMyContactInfoView extends Vue {
async mounted() {
// Debug logging for test diagnosis
const settings = await this.$settings();
// @ts-ignore
const activeDid = settings?.activeDid;
// @ts-ignore
// @ts-expect-error
window.__SHARE_CONTACT_DEBUG__ = { settings, activeDid };
// eslint-disable-next-line no-console
console.log("[ShareMyContactInfoView] mounted", { settings, activeDid });