[Bug report]: sddsModal throws error when using openModal and not passing a selector
Closed this issue · 0 comments
toliv3 commented
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
@scania/components@4.10.7
Browser
Chrome
Framework
Angular
Version
Angular 15
Reproduction steps
When using sdds-modal with the openModal/closeModal methods, there is no need to pass a selector for the modal to wire events to. If we don't pass a random selector the component will throw errors on the console. (just add a null check when initializing the component for the selector prop)
Code example
....
Screenshots
Expected behaviour
Component should not throw errors when selector is null/empty.
Console errors
Add warning/error message