Select to view content in your preferred language

Calcite-dialog closes when closing other floating elements inside (2.11.1)

177
3
Jump to solution
08-20-2024 11:13 PM
Labels (1)
FC_Basson
MVP Regular Contributor

With the new calcite-dialog component, when closing other "closable" elements contained within the dialog, the dialog also closes.  The happens with panels (inside a shell panel) and other dialogs.

Also, placing a calcite-shell component within the dialog, you need to resize it manually so that it does not cover the dialog header and footer components.

Here is a Codepen to demo the issues: https://codepen.io/fcbasson/pen/YzoazZE

This did not happen before the 2.11.x release.

It seems that the close button for all closable elements is a calcite-action component with a data-test="close" attribute, which is also now true for the calcite-dialog component, but it was not for the deprecated calcite-modal component.  So if you click the close button with the data-test="close" attribute inside a dialog, the event bubbles up and also closes the dialog.

Are there any other components to achieve the desired functionality?

0 Kudos
1 Solution

Accepted Solutions
MattDriscoll
Esri Contributor
0 Kudos
3 Replies
MattDriscoll
Esri Contributor

Hi @FC_Basson thanks for reporting these issues!

> With the new calcite-dialog component, when closing other "closable" elements contained within the dialog, the dialog also closes.  The happens with panels (inside a shell panel) and other dialogs.

I'll create an issue for this one.

Also, placing a calcite-shell component within the dialog, you need to resize it manually so that it does not cover the dialog header and footer components.

We have an issue for this one already. https://github.com/Esri/calcite-design-system/issues/10095

Are there any other components to achieve the desired functionality?

No, but you can continue using the modal component until these bugs are fixed.

0 Kudos
FC_Basson
MVP Regular Contributor

Thanks Matt.

0 Kudos
MattDriscoll
Esri Contributor
0 Kudos