Skip to content

Commit

Permalink
fix: issue with input and change event for angular, lit, stencil & ht…
Browse files Browse the repository at this point in the history
…ml (#1552)

* fix: issue with input and change event for angular, lit, stencil & html

* chore: format code and add changeset

* chore: update changeset to use patch instead on minor

* chore: update from main

* chore: update snapshots

* chore: update snapshots

* 🏃

---------

Co-authored-by: Sami Jaber <[email protected]>
  • Loading branch information
nmerget and samijaber authored Nov 1, 2024
1 parent b5ddfa3 commit 068be0d
Show file tree
Hide file tree
Showing 36 changed files with 3,352 additions and 655 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-crabs-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@builder.io/mitosis': patch
---

[Angular, Lit, Stencil, HTML] fix: remove mapping onChange to input event
52 changes: 52 additions & 0 deletions packages/core/src/__tests__/__snapshots__/alpine.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,32 @@ exports[`Alpine.js > jsx > Javascript Test > defaultValsWithTypes 1`] = `
"
`;
exports[`Alpine.js > jsx > Javascript Test > eventInputAndChange 1`] = `
"<style>
.input {
color: red;
}
</style>
<div x-data=\\"eventInputAndChange()\\">
<input
class=\\"input\\"
x-bind:value=\\"name\\"
x-on:input=\\"name = $event.target.value\\"
x-on:change=\\"name = $event.target.value\\"
/>
Hello! I can run in React, Vue, Solid, or Liquid!
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Alpine.data(\\"eventInputAndChange\\", () => ({
name: \\"Steve\\",
}));
});
</script>
"
`;
exports[`Alpine.js > jsx > Javascript Test > expressionState 1`] = `
"<div x-data=\\"myComponent()\\"><span x-html=\\"refToUse\\"></span></div>
<script>
Expand Down Expand Up @@ -4771,6 +4797,32 @@ exports[`Alpine.js > jsx > Typescript Test > defaultValsWithTypes 1`] = `
"
`;
exports[`Alpine.js > jsx > Typescript Test > eventInputAndChange 1`] = `
"<style>
.input {
color: red;
}
</style>
<div x-data=\\"eventInputAndChange()\\">
<input
class=\\"input\\"
x-bind:value=\\"name\\"
x-on:input=\\"name = $event.target.value\\"
x-on:change=\\"name = $event.target.value\\"
/>
Hello! I can run in React, Vue, Solid, or Liquid!
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Alpine.data(\\"eventInputAndChange\\", () => ({
name: \\"Steve\\",
}));
});
</script>
"
`;
exports[`Alpine.js > jsx > Typescript Test > expressionState 1`] = `
"<div x-data=\\"myComponent()\\"><span x-html=\\"refToUse\\"></span></div>
<script>
Expand Down
Loading

0 comments on commit 068be0d

Please sign in to comment.