ngOfficeUIFabric / ng-officeuifabric

Office UI Fabric (https://github.com/OfficeDev/office-ui-fabric) implementation for Angular
http://ngOfficeUiFabric.com
MIT License
321 stars 67 forks source link

Callout: unable to close by button inside #450

Closed Rus7am closed 7 years ago

Rus7am commented 7 years ago

I'd like to be able to close a callout with uif-close attribute by clicking a button located inside uif-callout-actions component. Please see the codepen: after the Close button is clicked the ctrl.show property is being reset and the callout stays open.

I was hoping to fix this myself but everything is in TypeScript and I don't really understand it yet, sorry.

andrewconnell commented 7 years ago

ATM the uif-dialog directive's functionality is very limited. This was one of the very first directives & ideally it would match the same signature and behavior the Office React version would have: https://dev.office.com/fabric#/components/dialog.

The right thing to do is to not fix this issue, rather to improve the directive to have feature parity with it's React sibling. Going to close this issue out and reference the new feature request issue 455

FWIW, we already had a discussion going on this issue: # 363

andrewconnell commented 7 years ago

Nixing my previous comment... I got my wires crossed got uif-dialog & uif-callout backward. This appears to be a similar issue to #358 in the sense that the binding isn't being respected.

Reopening this and flagging as a bug to be investigated. I believe it's the binding defined here that's the root cause: https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/src/components/callout/calloutDirective.ts#L223-L226

Need to add a test to duplicate the bug & then resolve.