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

Fix/616 vue custom event listeners #617

Conversation

andrewbeng89
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally for affected output targets
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: #616

In example-project/vue-app/src/components/Input.vue v-model binding and @myChange handling are not behaving as expected:

<template>
  <div>
    <MyInput
      v-model="inputValue"
      @myChange="handleChange"
    >
    </MyInput>
    <div class="inputResult">
      <p>Input v-model: {{ inputValue }}</p>
      <p>Change Event: {{ changeEvent }}</p>
    </div>
  </div>
</template>

The corresponding E2E test for this behaviour should pass:

  it('should allow to interact with input element', async () => {
    await $('my-input').$('input').setValue('Hello World');
    await expect(await $$('.inputResult p').map((p) => p.getText())).toEqual([
      'Input v-model: Hello World',
      'Change Event: Hello World'
    ]);
  });

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Thanks a lot!

@christian-bromann christian-bromann merged commit e8f92eb into stenciljs:main Feb 21, 2025
3 checks passed
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.

2 participants