You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a modal with a dynamic form. Based on a switch control, a large part of the form is displayed / hidden side-by-side with the existing form inside the same modal. Due to this, we would like to increase / decrease the modal size dynamically after it has been opened.
This could be easily achieved by setting the size / fullscreen properties on the NgbModalWindow.
Unfortunately, the NgbModalWindow is not exposed, so we used a little hack to access it: (ngbModalRef as any)._windowCmptRef.instance;
We see a few ways to add support for this:
Expose the NgbModalWindow class, such that the NgbModalWindow can be injected into a child component (this is the technical approach we sort of achieve with the hack above)
Add a public getter or field modalWindow on the NgbModalRef which provides _windowCmptRef.instance. This could return a custom-tailored interface type that only exposes what is reasonable to add to the public API
Or is there another way how we can achieve that?
Maybe we can help/provide a PR if we see a reasonable chance this would get integrated. But as it widens the public API I we would like to discuss first.
The text was updated successfully, but these errors were encountered:
We have a modal with a dynamic form. Based on a switch control, a large part of the form is displayed / hidden side-by-side with the existing form inside the same modal. Due to this, we would like to increase / decrease the modal size dynamically after it has been opened.
This could be easily achieved by setting the
size
/fullscreen
properties on theNgbModalWindow
.Unfortunately, the
NgbModalWindow
is not exposed, so we used a little hack to access it:(ngbModalRef as any)._windowCmptRef.instance;
We see a few ways to add support for this:
NgbModalWindow
class, such that theNgbModalWindow
can be injected into a child component (this is the technical approach we sort of achieve with the hack above)modalWindow
on theNgbModalRef
which provides_windowCmptRef.instance
. This could return a custom-tailored interface type that only exposes what is reasonable to add to the public APIOr is there another way how we can achieve that?
Maybe we can help/provide a PR if we see a reasonable chance this would get integrated. But as it widens the public API I we would like to discuss first.
The text was updated successfully, but these errors were encountered: