Skip to content

StringComponent

component

Creates form input for strings. Based on the input values different kinds of inputs will be generated.

Implements ControlValueAccessor so it can be used within Angular forms.

Example :

<!-- string input validating input to be between 5 and 10 characters -->
<yuv-string [minLength]="5" [maxLength]="10"></yuv-string>

<yuv-string [regex]="[0-9]*">

<yuv-string [rows]="10">

Selector: yuv-string

Standalone: Yes

Implements: ControlValueAccessor, AfterViewInit, OnInit, OnDestroy

Type: boolean

Default Value: false

Enable autofucus for the input (default: false)

Type: string[]

Additional semantics for the form element. Possible values are email (validates and creates a link to send an email once there is a valid email address) and url (validates and creates a link to an URL typed into the form element).

Type: number

Maximum number of characters

Type: number

Minimal number of characters

Type: boolean

Default Value: false

Indicator that multiple strings could be inserted, they will be rendered as chips (default: false).

Type: boolean

Default Value: false

Will prevent the input from being changed (default: false)

Type: string

Regular expression to validate the input value against

Type: number

Setting rows to more than 1 will generate a textarea instead of an input tag and apply the rows property to it

Type: string

Possibles values are EDIT (default),SEARCH,CREATE. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.

Type: BooleanInput

Type: string

Type: BooleanInput

Type: object

Default Value: \{ email: 'email', url: 'language', phone: 'call' \}

Type: literal type

Type: unknown

Default Value: new FormControl<string | string[] | undefined>(undefined)

Type: FormattedMailTo

Type: number

Type: unknown

Default Value: injectNgControl(this)

Type: unknown

Default Value: () => \{...\}

Type: unknown

Default Value: [ENTER, COMMA] as const

Type: unknown

Default Value: false

Type: literal type[]

Default Value: []

Type: boolean

Type: string

Type: boolean

Type: unknown

Default Value: new Subject<void>()

Type: string

chipsAdd(event: MatChipInputEvent): void
NameTypeDescription
eventMatChipInputEvent
chipsEdit(v: string, event: MatChipEditedEvent): void
NameTypeDescription
vstring
eventMatChipEditedEvent
chipsRemove(v: string): void
NameTypeDescription
vstring
onBlur(): void
registerOnChange(fn: any): void
NameTypeDescription
fnany
registerOnTouched(): void
setDisabledState(isDisabled: boolean): void
NameTypeDescription
isDisabledboolean
writeValue(value: string | string[]): void
NameTypeDescription
valuestring | string[]
onContainerClick(event: MouseEvent): void
NameTypeDescription
eventMouseEvent
onFocusIn(): void
onFocusout(): void
onNgOnDestroy(): void
setDescribedByIds(ids: string[]): void
NameTypeDescription
idsstring[]