Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Modal onCancel function #76

Merged
merged 1 commit into from May 29, 2017
Merged

Update Modal onCancel function #76

merged 1 commit into from May 29, 2017

Conversation

cmd-shift-s
Copy link
Contributor

when Modal is closed, i want to receive arguments.

when Modal is closed, i want to receive arguments.
@cmd-shift-s
Copy link
Contributor Author

for example

// ModalForm.vue
this.$emit('close', 'gongzza')

// Parent.vue
this.$modal.open({
  component: ModalForm,
  onCancel: name => {
    this.name = name
  }
})

when Modal is closed, this.name's value will be gongzza.

@rafaberaldo
Copy link
Member

Hi, thanks for contributing!

Does the apply is needed here? We're not passing another this 🤔

@cmd-shift-s
Copy link
Contributor Author

i'm sorry. i can't understand what you said that "We're not passing another this"?

i looked this. so i used apply
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator

@rafaberaldo
Copy link
Member

Nevermind, you're right.

@rafaberaldo rafaberaldo merged commit dd80b86 into buefy:dev May 29, 2017
kikuomax added a commit to kikuomax/buefy that referenced this pull request Sep 18, 2023
* test(lib): update MessageMixin spec

- Updates the unit tests (spec) of `MessageMixin` so that they can work
  with `@vue/test-utils` V2 and the breaking change:
    - Corrects a v-model binding: `active` → `modelValue`
    - Awaits `wrapper.setProps` to make sure the subsequent tests verify
      the updated state.
    - Replaces legacy async test cases with async functions.
    - Moves `mixins` option for `shallowMount` to the template
      parameters, because it is a more straightforward way to do the
      same thing.

issue ntohq#1

* test(lib): update Message spec

- Updates the unit tests (spec) of `Message` so that they can work with
  `@vue/test-utils` V2:
    - Replaces `wrapper.name()` with `wrapper.vm.$options.name` because
      `wrapper.name` no longer exists in `@vue/test-utils` V2.
    - Replaces the test on `wrapper.isVueInstance()` with presence of
      `wrapper.vm` because `wrapper.isVueInstance` no longer exists in
      `@vue/test-utils` V2.
    - Refreshes the snapshot. I did not find any problems in the updated
      snapshot.

issue ntohq#1
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.

None yet

2 participants