blackbaud / skyux1

DEPRECATED This site contains the codebase for the AngularJS (1.x) implementation of the SKY UX framework. We no longer support this version of SKY UX, and we recommend that you use the latest version instead. https://developer.blackbaud.com/skyux/
MIT License
51 stars 68 forks source link

bb-summary-actionbar-cancel button is not working #1085

Closed ghost closed 6 years ago

ghost commented 6 years ago

Expected behavior

Modal should close on click of "bb-summary-actionbar-cancel" button.

Actual behavior

Modal is not getting closed

Steps to reproduce

click any link to open modal which contain summary action bar. click cancel button to close the modal.

Plunker

http://plnkr.co/edit/aLLXDsEyeWdYHBt3Jbat?p=preview

Blackbaud-BobbyEarl commented 6 years ago

Hey @Blackbaud-RakeshGarg, I believe there's a bit of a discrepency between the documentation and the actual functionality. Unlike the bb-modal-footer-button-cancel which will automatically close the modal, the bb-summary-actionbar-cancel button currently only provides the styling of a cancel button.

You would need to provide your own click handler to close the modal. Here's an example of that forked from your original plunkr. http://plnkr.co/edit/lv8qO6QxoegvTHClpltP?p=preview

I'm not sure if this behavior was intended, perhaps @Blackbaud-ToddRoberts can remember. If it is, we should probably make the documentation represent the current state @blackbaud-johnly.

Blackbaud-BobbyEarl commented 6 years ago

Talking with @blackbaud-johnly this morning and it hit me, doesn't make sense for us to close the modal automatically as this component can be used outside of a modal (as seen on the demo page).

That means we should probably clarify that behavior in the docs and probably even update the demo to close the modal (as shown in my plunkr).

ghost commented 6 years ago

Thank you for the details. I am good with your explanation and let me implement "bb-summary-action-click" behavior for cancel button too.

blackbaud-johnly commented 6 years ago

@Blackbaud-RakeshGarg, just FYI that I updated the description of bb-summary-action-click and the behavior of the button in the demo in https://github.com/blackbaud/skyux/pull/1088. So the docs will be updated to reflect Bobby's feedback in the next SKY UX 1 release.