mirror of https://github.com/sveltejs/svelte
				
				
				
			Merge pull request #1280 from sveltejs/dynamic-component-mount-ref
	
		
	
				
					
				
			when mounting dynamic components, set ref if requiredpull/1283/head
						commit
						48643ca3ea
					
				@ -0,0 +1 @@
 | 
				
			||||
Foo
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
export default {
 | 
				
			||||
	html: `Foo`,
 | 
				
			||||
 | 
				
			||||
	test(assert, component) {
 | 
				
			||||
		assert.ok(component.refs.test);
 | 
				
			||||
	}
 | 
				
			||||
};
 | 
				
			||||
@ -0,0 +1,11 @@
 | 
				
			||||
<:Component {foo} ref:test/>
 | 
				
			||||
 | 
				
			||||
<script>
 | 
				
			||||
	import Foo from './Foo.html';
 | 
				
			||||
 | 
				
			||||
	export default {
 | 
				
			||||
		data() {
 | 
				
			||||
			return { foo: Foo };
 | 
				
			||||
		}
 | 
				
			||||
	};
 | 
				
			||||
</script>
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue