[Bug report]: Textfield - Reactive form touched (Form and specific field)
Closed this issue · 3 comments
Requirements before reporting
- No duplicated issue reported.
- I have read the contribution guidelines.
- I have checked the lastest version if the bug exist there. See all avaliable packages at npmJS.com
- I have made sure that the issue comes from SDDS packages by removing SDDS from my project as a test.
- I have followed the installation guide.
Package
@scania/components
Package versions
4.10.6
Browser
Chrome
Framework
Angular
Version
angular 13 (sandbox in sdds)
Reproduction steps
- Make sure you use the latest version of sdds in the package.json after the form (open shadowDom update)
- Go to the reactive form in angular sandbox
- click or/and change value in the sdds-textfield
- Click on
- Check if touched value is true
notes:
- Latest does not install 4.10.x for some reason in the sandbox env for angular.
- Try this with shadowdom close and it works.
- Onblur events doesn't bubble up, maybe a seperate function is needed for that ? 🤔
Code example
Use sandbox angular env
go for forms check reactive form
Screenshots
Touched is still false after change
Expected behaviour
textfield should be able to react to the formcontrols that angular provides.
Console errors
No warnings
Contact information
Interesting!
In this PR: 2356f67
We added some events that needed to bubbled up to the host element when we removed the shadowDOM. This includes input/change/blur and focus. Im wondering if maybe this could be a solution to the issue. We'll try to do a release with this merged PR next week, hopefully you could try it out then.
We have now done a new release that might (🤞) have an impact of your issue, if possible try out version 4.10.7 and reach out if this has solved or not solved the issue.
This appears to still be an issue in @scania/components": "4.10.10", Blur is not working in Angular.