@Sgs worked on a component that wraps the Dialog component, and suggested that we should document that with an example. Some things that are not super obvious:
- You have to use useModelWrapper to wrap v-model:open; and useModelWrapper itself is not documented due to T295186
- If you want to execute code when the dialog opens or closes, you should not listen to the update:open event; instead, you should use watch() on the open prop (or on its wrapper). The former only catches the dialog closing itself, the latter catches all changes.
- There are other events like primary and default, to it's confusing that there's no close event. In an unwrapped scenario, it would be safe to listen to the update:open event, but I'd probably still recommend using a watcher for consistency
- Update Dialog docs to explain how to listen for the dialog closing (using a watcher)
- Add an example of a wrapped dialog component to the Dialog docs