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

Error: SMUI Textfield initialized without Input component #628

Open
vhscom opened this issue Oct 3, 2023 · 0 comments
Open

Error: SMUI Textfield initialized without Input component #628

vhscom opened this issue Oct 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vhscom
Copy link
Contributor

vhscom commented Oct 3, 2023

Describe the bug

I'm using the v7 beta and this code from OP of #274 throws an error:

<script>
  import TextField from "@smui/textfield"
</script>
<TextField/>

Error thrown:

Textfield.svelte:431 Uncaught (in promise) Error: SMUI Textfield initialized without Input component.
    at Textfield.svelte:431:30

Among other probable methods, the error can be resolved by setting a bind:value for the Textfield tag like:

<script>
  import TextField from "@smui/textfield"
  let quantity = ''
</script>
<TextField/>
<Textfield
  bind:value={quantity}
  label="Quantity"
/>

Expected behavior
Component renders when <Textfield /> is added to the page, error specified is not thrown

Additional context
I'm using the v7 beta 15 but I suspect this bug has existed for a while and may be a regression if #274 was fixed in v5.

@vhscom vhscom added the bug Something isn't working label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant