Skip to content

Commit

Permalink
Fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Ngo committed Jun 6, 2024
1 parent 9ba7b7b commit 7614f89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ declare module 'vue' {
Button: typeof import('primevue/button')['default']
FlagEditor: typeof import('./src/components/FlagEditor.vue')['default']
TabMenu: typeof import('primevue/tabmenu')['default']
Textarea: typeof import('primevue/textarea')['default']
}
}
6 changes: 3 additions & 3 deletions src/components/FlagEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const updateValueObject = (key: string, newValue: ObjectFlagFieldType): void =>
/>
<InputNumber
v-else-if="typeof value === 'number'"
:model-value="currentValueObject[key]"
:model-value="Number(currentValueObject[key])"
class="flag-field-number"
:min-fraction-digits="0"
:max-fraction-digits="8"
Expand All @@ -117,9 +117,9 @@ const updateValueObject = (key: string, newValue: ObjectFlagFieldType): void =>
/>
<InputText
v-else-if="typeof value === 'string'"
:model-value="currentValueObject[key]"
:model-value="String(currentValueObject[key])"
class="flag-field-string"
@update:model-value="(value: string) => updateValueObject(key, value)"
@update:model-value="(value?: string) => updateValueObject(key, value ?? '')"
/>
</span>
</div>
Expand Down

0 comments on commit 7614f89

Please sign in to comment.