Skip to content

Handle rejected Modal onOk promises#6690

Open
zzzzzzzzzzzzzzm wants to merge 1 commit into
iview:2.0from
zzzzzzzzzzzzzzm:fix-modal-ok-promise-loading
Open

Handle rejected Modal onOk promises#6690
zzzzzzzzzzzzzzm wants to merge 1 commit into
iview:2.0from
zzzzzzzzzzzzzzm:fix-modal-ok-promise-loading

Conversation

@zzzzzzzzzzzzzzm

Copy link
Copy Markdown

Closes #2364

Summary

  • support Promise results from Modal OK handlers when loading is enabled
  • close the modal when the Promise resolves
  • stop the OK button loading state and keep the modal open when the Promise rejects
  • update ModalConfig typings and add unit coverage

Tests

  • pnpm exec eslint src/components/modal/modal.vue src/components/modal/confirm.js test/unit/specs/modal.spec.js
  • pnpm run unit (blocked: old Karma setup cannot load webpack/sourcemap preprocessors in this local pnpm environment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]Modal: remove the "loading" flag by code, without closing the modal

1 participant