Skip to content

tui-input is not reacting to touched #9324

Closed Answered by waterplea
vytautas-pranskunas- asked this question in Q&A
Discussion options

You must be logged in to vote

markAsTouched only updates the touched state on control with no way of notifying the component. It's one of the longest standing issues for Angular that only got fixed in 18, which we cannot yet use:
angular/angular#10887

We have tuiMarkControlAsTouchedAndValidate which you can use to recursively update any AbstractControl combination. It calls both markAsTouched and updateValueAndValidity, which triggers statusChange stream. It would also trigger valueChange so be careful, maybe you need distinctUntilChange somewhere in your streams to not react to that.

P.S. Come to think of it, we can probably typecast the control to any and reach for that events stream if it's there, that would make i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by waterplea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants