CountrySelector (#18035)

This commit is contained in:
G Johansson
2023-10-12 16:47:28 +02:00
committed by GitHub
parent 6d1e923b83
commit 4c94ac5dda
6 changed files with 107 additions and 18 deletions

View File

@@ -66,6 +66,10 @@ export const computeInitialHaFormData = (
typeof firstOption === "string" ? firstOption : firstOption.value;
data[field.name] = selector.select.multiple ? [val] : val;
}
} else if ("country" in selector) {
if (selector.country?.countries?.length) {
data[field.name] = selector.country.countries[0];
}
} else if ("duration" in selector) {
data[field.name] = {
hours: 0,