Skip to content

Conversation

@raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Feb 16, 2023

This PR allows to toggle the modal visibility by setting the show prop of the modal, which will keep the modal in the DOM.
It also fixes the transition animation of the modal-wrapper when showing/hiding the modal with v-if.
Checkout the docs https://deploy-preview-3769--nextcloud-vue-components.netlify.app/#/Components/NcModal and enjoy a smooth modal wrapper animation 😉

@susnux I think this is the best version of the solution now, as it allows to use v-show / :show.sync="modal" or v-if, fixes the transition animations for both and requires no watcher.

Fixes #497.

@raimund-schluessler raimund-schluessler force-pushed the fix/ncmodal-show-prop branch 2 times, most recently from 3c95c30 to 6c11a61 Compare February 16, 2023 14:38
@raimund-schluessler raimund-schluessler changed the title fix(NcModal): Allow modals to be triggered by v-show Allow using v-show for NcModal, fix modal-wrapper transition Feb 16, 2023
@raimund-schluessler raimund-schluessler added this to the 7.7.0 milestone Feb 16, 2023
@raimund-schluessler raimund-schluessler added enhancement New feature or request 3. to review Waiting for reviews feature: modal Related to the modal component labels Feb 16, 2023
@raimund-schluessler raimund-schluessler marked this pull request as ready for review February 16, 2023 14:58
@susnux

This comment was marked as resolved.

@raimund-schluessler

This comment was marked as resolved.

@raimund-schluessler raimund-schluessler marked this pull request as draft February 16, 2023 15:54
@raimund-schluessler

This comment was marked as resolved.

@raimund-schluessler

This comment was marked as resolved.

@raimund-schluessler
Copy link
Contributor Author

@susnux Everything should work now.

@raimund-schluessler raimund-schluessler marked this pull request as ready for review February 16, 2023 19:30
@raimund-schluessler raimund-schluessler added the bug Something isn't working label Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working enhancement New feature or request feature: modal Related to the modal component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modal component doesn't work twice

4 participants