Fix Options flow missing submit button & finish button. (#17361)

* Fix missing submit button in options flow

* Fix missing header and finish button at end of options flow

* load config translations for options flow

* one more revert
This commit is contained in:
karwosts 2023-07-20 18:02:08 -07:00 committed by GitHub
parent 795831d4cf
commit 308d4b0a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ export const showConfigFlowDialog = (
createFlow: async (hass, handler) => {
const [step] = await Promise.all([
createConfigFlow(hass, handler),
hass.loadFragmentTranslation("config"),
hass.loadBackendTranslation("config", handler),
hass.loadBackendTranslation("selector", handler),
// Used as fallback if no header defined for step
@ -32,6 +33,7 @@ export const showConfigFlowDialog = (
},
fetchFlow: async (hass, flowId) => {
const step = await fetchConfigFlow(hass, flowId);
await hass.loadFragmentTranslation("config");
await hass.loadBackendTranslation("config", step.handler);
await hass.loadBackendTranslation("selector", step.handler);
return step;

View File

@ -31,6 +31,7 @@ export const showOptionsFlowDialog = (
createFlow: async (hass, handler) => {
const [step] = await Promise.all([
createOptionsFlow(hass, handler),
hass.loadFragmentTranslation("config"),
hass.loadBackendTranslation("options", configEntry.domain),
hass.loadBackendTranslation("selector", configEntry.domain),
]);
@ -39,6 +40,7 @@ export const showOptionsFlowDialog = (
fetchFlow: async (hass, flowId) => {
const [step] = await Promise.all([
fetchOptionsFlow(hass, flowId),
hass.loadFragmentTranslation("config"),
hass.loadBackendTranslation("options", configEntry.domain),
hass.loadBackendTranslation("selector", configEntry.domain),
]);