We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not implemented Empty
<option/>
<select/>
Title says it. Nesting a "slotted" option component inside a "slotted" select component does not compile.
<script> import Select from "./Select.svelte"; import Option from "./Option.svelte"; </script> <Select> <Option>Option 1</Option> <Option>Option 2</Option> <Option>Option 3</Option> </Select>
<!-- Select.svelte --> <select><slot></slot></select>
<!-- Option.svelte --> <option><slot></slot></option>
https://svelte.dev/repl/b4d2861bf2e84898970e25d551f55ef2?version=3.44.2
System: OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz Memory: 3.12 GB / 5.70 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 16.6.1 - ~/.nvm/versions/node/v16.6.1/bin/node npm: 7.20.3 - ~/.nvm/versions/node/v16.6.1/bin/npm
blocking all usage of svelte
The text was updated successfully, but these errors were encountered:
Hi @kwangure.
I'm not a maintainer, but I'll comment as it may be able to help you. I think you need to add a value attribute to the <option> tag.
<option>
<!-- Option.svelte --> <script> export let value </script> <option value={value}> <slot></slot> </option>
<script> import Select from "./Select.svelte"; import Option from "./Option.svelte"; </script> <Select> <Option value="Option 1">Option 1</Option> <Option value="Option 2">Option 2</Option> <Option value="Option 3">Option 3</Option> </Select>
If there is no value attribute, Svelte compiler guess from the content, but it doesn't seem to work well with the <slot> tag.
<slot>
I think it could be a bug that the error message is confusing to the user.
Sorry, something went wrong.
I think it's probably the same as #2723.
Closing this as a duplicate of #2723.
No branches or pull requests
Describe the bug
Title says it. Nesting a "slotted" option component inside a "slotted" select component does not compile.
Reproduction
https://svelte.dev/repl/b4d2861bf2e84898970e25d551f55ef2?version=3.44.2
Logs
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: