mirror of https://github.com/sveltejs/svelte
Fix binding to values in a component when it uses `$$props` (#2725)
parent
01676aac46
commit
60914b86fd
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
export let actualValue;
|
||||
let x = $$props;
|
||||
</script>
|
||||
|
||||
<input bind:value={actualValue}>
|
@ -0,0 +1,14 @@
|
||||
export default {
|
||||
async test({ assert, target, window }) {
|
||||
const input = target.querySelector('input');
|
||||
|
||||
const event = new window.Event('input');
|
||||
input.value = 'changed';
|
||||
await input.dispatchEvent(event);
|
||||
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<input>
|
||||
<p>changed</p>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Input from './TextInput.svelte';
|
||||
export let actualValue = '';
|
||||
</script>
|
||||
|
||||
<Input bind:actualValue />
|
||||
<p>{actualValue}</p>
|
Loading…
Reference in new issue