Skip to content

Dialog Cascading windows

Victor Tomaili edited this page May 3, 2021 · 1 revision

Basic Building Blocks Series: Within the basic building blocks series over time I will add all the little things which someone who just starts with Serenity Framework would have to spend a lot of time figuring it out him/herself.

What you get with this article: Dialogs will nicely cascade when child dialog is same size than parent.

Without:

without

With:

with

Solution: In your child xyzDialog.ts, add the following:

        protected onDialogOpen() {
            super.onDialogOpen();

            var prior = $(".ui-dialog").eq(-2);
            if (prior.length > 0) {
                Serenity.SubDialogHelper.cascade(this, prior);
            }
        }

Freely reused from this issue and transposed from Saltarelle to Typescript. Thanks, @Volkan for the initial solution for Saltarelle and to @dfaruque for the pictures.

Regards,

John

Clone this wiki locally