Skip to content

Conversation

@renshuo
Copy link

@renshuo renshuo commented Apr 23, 2018

add a event: on-visible-change
when visible of modal to be true or false, this event dispatched with new value of visible.

scene:
user open a modal with a form, one of the value in form should initialized by calling a REST service.
then user cancel or confirm the modal.
next, user reopen the modal, here need a new value by calling the REST service.

SO, add on-visible-change event for this scene.

@tangjinzhou
Copy link
Member

Maybe you can use watch visible change to achieve this scene.

@Tianyz
Copy link

Tianyz commented Nov 21, 2019

Maybe you can use watch visible change to achieve this scene.

But I think it would mess up my code, it's component's job to tell me when the visibility of Modal changed.
Just listen to open or close then run callbacks is better than write a watch and then check if visible true or false everywhere.
The proper way is both support the open and close event.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants