File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/packages/core/components/input-with-alias Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ export class UmbInputWithAliasElement extends UmbFormControlMixin<string>(UmbLit
13
13
@property ( { type : String , reflect : false } )
14
14
alias ?: string ;
15
15
16
+ @property ( { type : Boolean , attribute : 'auto-generate-alias' } )
17
+ autoGenerateAlias ?: boolean ;
18
+
16
19
@state ( )
17
20
private _aliasLocked = true ;
18
21
@@ -32,7 +35,7 @@ export class UmbInputWithAliasElement extends UmbFormControlMixin<string>(UmbLit
32
35
const oldName = this . value ;
33
36
const oldAlias = this . alias ?? '' ;
34
37
this . value = event . target . value . toString ( ) ;
35
- if ( this . _aliasLocked ) {
38
+ if ( this . autoGenerateAlias && this . _aliasLocked ) {
36
39
// If locked we will update the alias, but only if it matches the generated alias of the old name [NL]
37
40
const expectedOldAlias = generateAlias ( oldName ?? '' ) ;
38
41
// Only update the alias if the alias matches a generated alias of the old name (otherwise the alias is considered one written by the user.) [NL]
You can’t perform that action at this time.
0 commit comments