11import { UMB_DICTIONARY_WORKSPACE_CONTEXT } from '../dictionary-workspace.context-token.js' ;
22import type { UmbDictionaryDetailModel } from '../../types.js' ;
33import type { UUITextareaElement } from '@umbraco-cms/backoffice/external/uui' ;
4- import { UUITextareaEvent } from '@umbraco-cms/backoffice/external/uui' ;
54import { css , html , customElement , state , repeat } from '@umbraco-cms/backoffice/external/lit' ;
65import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element' ;
76import { UmbLanguageCollectionRepository , type UmbLanguageDetailModel } from '@umbraco-cms/backoffice/language' ;
@@ -72,13 +71,11 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement {
7271 }
7372
7473 #onTextareaChange( e : Event ) {
75- if ( e instanceof UUITextareaEvent ) {
76- const target = e . composedPath ( ) [ 0 ] as UUITextareaElement ;
77- const translation = ( target . value as string ) . toString ( ) ;
78- const isoCode = target . getAttribute ( 'name' ) ! ;
74+ const target = e . composedPath ( ) [ 0 ] as UUITextareaElement ;
75+ const translation = ( target . value as string ) . toString ( ) ;
76+ const isoCode = target . getAttribute ( 'name' ) ! ;
7977
80- this . #workspaceContext?. setPropertyValue ( isoCode , translation ) ;
81- }
78+ this . #workspaceContext?. setPropertyValue ( isoCode , translation ) ;
8279 }
8380
8481 override render ( ) {
@@ -104,7 +101,7 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement {
104101 slot= "editor"
105102 name = ${ language . unique }
106103 label= "translation"
107- @change = ${ this . #onTextareaChange}
104+ @input = ${ this . #onTextareaChange}
108105 .value = ${ translation ?. translation ?? '' }
109106 ?readonly = ${ this . #isReadOnly( language . unique ) } > </ uui- textarea>
110107 </ umb- property- layout> ` ;
0 commit comments