scania-digital-design-system/sdds

[Feature Request]: add closeModal() method to sdds_modal

Closed this issue · 2 comments

Requirements before reporting

  • No duplicated issue reported
  • I have read the contribution guidelines
  • I have checked the lastest version if the feature exist there

Type of feature request

Functionality

What is your feature request?

You can open programmatically the sdds_modal component with openModal() but there's no closeModal() equivalent.
Please allow programmatic control over the modal component as the selector option is cumbersome to be used with dynamic action buttons.

Background

More programmatic control over sdds_modal is needed.

Idea

No response

Goals and objectives

No response

Timeline

No response

Resources

No response

Contact information

thiago.oliveira@scania.com

Thanks for this feature request! I agree that it would make sense to include a closeModal function. In our new package @scania/tegel we will move the open/closed state of the component to a prop instead, so it can be toggled however you may want to. But for our old package (@scania/components) I will add this public method to the component and hopefully we can include it in our next release.