Skip to content

Commit

Permalink
Fix Options flow missing submit button & finish button. (#17361)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
karwosts authored Jul 21, 2023
1 parent 795831d commit 308d4b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dialogs/config-flow/show-dialog-config-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/dialogs/config-flow/show-dialog-options-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]);
Expand All @@ -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),
]);
Expand Down

0 comments on commit 308d4b0

Please sign in to comment.