Closed jak-hammond closed 5 years ago
Hi, the behaviour of add close event on overlay element is defined on the office-ui-js. So this behaviour is on expected. Because the overlay component don't have callback when overlay closed, So I use v-model is just for track overlay visibility when user click overlay element to close it.
At the moment the
ou-overlay
supports a v-model property to control whether or not the overlay is visible. When the overlay is created, a click even is then added to it that closes the overlay whenever a user clicks on it, this emits aninput
event and sets the value to false.The issue is, if I am passing in a prop to control when this overlay should/should not be visible, I do not want the user to close this when they click on it. Using v-model to achieve also seems a little wrong.
IMO the overlay needs v-model breaking into 2 props;
closeOnClick
andvisible
. This then lets the implementer control both the visibility and whether or not the user can close the overlay by clicking on it. It has the added benefit of removing the unnecessary input event emits too.