mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Load translations when adding item in pickers (#20325)
* Load translations when adding item in pickers * Update ha-selector-label.ts
This commit is contained in:
parent
169d782580
commit
21ed8e4206
@ -428,6 +428,8 @@ export class HaAreaPicker extends LitElement {
|
|||||||
|
|
||||||
(ev.target as any).value = this._value;
|
(ev.target as any).value = this._value;
|
||||||
|
|
||||||
|
this.hass.loadFragmentTranslation("config");
|
||||||
|
|
||||||
showAreaRegistryDetailDialog(this, {
|
showAreaRegistryDetailDialog(this, {
|
||||||
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
||||||
createEntry: async (values) => {
|
createEntry: async (values) => {
|
||||||
|
@ -437,6 +437,8 @@ export class HaFloorPicker extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
(ev.target as any).value = this._value;
|
(ev.target as any).value = this._value;
|
||||||
|
|
||||||
|
this.hass.loadFragmentTranslation("config");
|
||||||
|
|
||||||
showFloorRegistryDetailDialog(this, {
|
showFloorRegistryDetailDialog(this, {
|
||||||
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
||||||
createEntry: async (values) => {
|
createEntry: async (values) => {
|
||||||
|
@ -445,6 +445,8 @@ export class HaLabelPicker extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
(ev.target as any).value = this._value;
|
(ev.target as any).value = this._value;
|
||||||
|
|
||||||
|
this.hass.loadFragmentTranslation("config");
|
||||||
|
|
||||||
showLabelDetailDialog(this, {
|
showLabelDetailDialog(this, {
|
||||||
entry: undefined,
|
entry: undefined,
|
||||||
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
||||||
|
@ -30,6 +30,7 @@ export class HaLabelSelector extends LitElement {
|
|||||||
if (this.selector.label.multiple) {
|
if (this.selector.label.multiple) {
|
||||||
return html`
|
return html`
|
||||||
<ha-labels-picker
|
<ha-labels-picker
|
||||||
|
no-add
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.value=${ensureArray(this.value ?? [])}
|
.value=${ensureArray(this.value ?? [])}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
@ -41,6 +42,7 @@ export class HaLabelSelector extends LitElement {
|
|||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
<ha-label-picker
|
<ha-label-picker
|
||||||
|
no-add
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.value=${this.value}
|
.value=${this.value}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
|
@ -237,6 +237,8 @@ export class HaCategoryPicker extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
(ev.target as any).value = this._value;
|
(ev.target as any).value = this._value;
|
||||||
|
|
||||||
|
this.hass.loadFragmentTranslation("config");
|
||||||
|
|
||||||
showCategoryRegistryDetailDialog(this, {
|
showCategoryRegistryDetailDialog(this, {
|
||||||
scope: this.scope!,
|
scope: this.scope!,
|
||||||
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
suggestedName: newValue === ADD_NEW_SUGGESTION_ID ? this._suggestion : "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user