-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2618 from EmilTholin/remove_21618scope_from_spread
Remove the $$scope key from $$props when calculating spread
- Loading branch information
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
test/runtime/samples/component-slot-spread-props/Nested.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div> | ||
<slot /> | ||
<div {...$$props}></div> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
test/runtime/samples/component-slot-spread-props/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default { | ||
html: ` | ||
<div> | ||
<input /> | ||
<div class="foo"></div> | ||
</div> | ||
`, | ||
|
||
async test({ assert, component, target }) { | ||
component.value = 'foo'; | ||
|
||
assert.htmlEqual(target.innerHTML, ` | ||
<div> | ||
<input /> | ||
<div class="foo"></div> | ||
</div> | ||
`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script> | ||
import Nested from './Nested.svelte'; | ||
export let value = ''; | ||
</script> | ||
|
||
<Nested class="foo"> | ||
<input bind:value /> | ||
</Nested> |