Skip to content

Update overlay component examples to use closed event instead of opened-changed #4456

@sissbruecker

Description

@sissbruecker

Documentation examples for overlay-based components currently use the opened-changed event with the only purpose of reacting to the component closing on its own.

In v25 this event has a behavior change, in that removing a component from the DOM when opened changes to false (so the overlay closes) will not trigger the closing animation anymore. Instead you would need to listen for the closed event before you can remove it.

While we don't seem to have any examples of conditional rendering of overlay components, we should still update the examples to encourage using closed over opened-changed for this purpose so that developers don't break the closing animation when they start using conditional rendering.

As such all usages of opened-changed should be removed from the examples.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions