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

bind:value causing infinite loop #708

Open
ZreXoc opened this issue Sep 10, 2024 · 0 comments
Open

bind:value causing infinite loop #708

ZreXoc opened this issue Sep 10, 2024 · 0 comments

Comments

@ZreXoc
Copy link

ZreXoc commented Sep 10, 2024

check https://svelte.dev/repl/0788779fb83b48eda24494eeb66a6f61?version=4.2.19

the REPL gets stuck immediately with ten thousands of logs so I post the code as follows.

App.svelte

<script>
  import Select from './Component2.svelte';

	let data = {
		value:{
				label:'One',
				value:'one'
			},
		item:[
			{
				label:'One',
				value:'one'
			},
			{
				label:'Two',
				value:'two'
			}
		]
	}

	$: console.log(data)
</script>

<Select bind:data />

Component2.svelte

<script>
	import Select from 'svelte-select';
	export let data

	$: console.log(data)
</script>

<Select bind:value={data.value} items={data.item}/>

I'm new to svelte so I don't know if it's my fault. But it seems to work well with other components except svelte-select

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

No branches or pull requests

1 participant