Skip to content

Commit aab9029

Browse files
committed
fix: state & city inputs not showing if no values are given
1 parent 30ad604 commit aab9029

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/components-vue/src/components/form/Input.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<FormInputOptions
44
v-if="!input.defaults && input.type === eFT.CHOICE"
55
v-slot="{ options }"
6+
:key="`options-${input.name}-${md5(String(input.values[0]))}-${input.options.length}`"
67
:input="input"
78
>
89
<div
@@ -298,6 +299,7 @@
298299
import { computed, reactive } from "vue";
299300
import validator from "validator";
300301
import _ from "lodash";
302+
import { md5 } from "js-md5";
301303
302304
import type { iInvalidInput, iSelectOption } from "@open-xamu-co/ui-common-types";
303305
import { eFormType as eFT } from "@open-xamu-co/ui-common-enums";

packages/components-vue/src/components/form/InputCountriesAPI.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
:promise="!!model[1] && unHydrate(getStateCities)"
1616
:payload="[countryValue, model[1]]"
1717
:no-loader="statesReq.loading"
18+
:fallback="[]"
1819
unwrap
1920
>
2021
<slot v-bind="{ statesReq, citiesReq }"></slot>

packages/components-vue/src/components/form/Simple.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
{{ getSuggestedTitle(input) }}
2323
</p>
2424
<FormInput
25-
:key="`simple-${input.name}-${md5(String(input.values[0]))}-${
26-
input.options.length
27-
}`"
25+
:key="`simple-${input.name}-${input.options.length}`"
2826
:readonly="readonly"
2927
:theme="theme"
3028
:input="input"
@@ -49,7 +47,6 @@
4947

5048
<script setup lang="ts" generic="P extends any[] = any[]">
5149
import { computed, ref, watch } from "vue";
52-
import { md5 } from "js-md5";
5350
import _ from "lodash";
5451
5552
import type { iInvalidInput } from "@open-xamu-co/ui-common-types";

0 commit comments

Comments
 (0)