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

TypeError: _this.input_ is null with Textfield #206

Closed
rafalou38 opened this issue Feb 21, 2021 · 3 comments
Closed

TypeError: _this.input_ is null with Textfield #206

rafalou38 opened this issue Feb 21, 2021 · 3 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@rafalou38
Copy link

When I use any text field:

<script>
	import Textfield from "@smui/textfield";
</script>

<Textfield label="Username" />

I get this error:

Uncaught (in promise) TypeError: _this.input_ is null
    registerInteractionHandler component.js:444
    registerRootHandlers_ foundation.js:212
    registerRootHandlers_ foundation.js:211
    init foundation.js:110
    MDCComponent component.js:36
    MDCRipple component.js:32
    rippleFactory component.js:48
    createRipple_ component.js:448
    initialize component.js:93
    MDCComponent component.js:32
    MDCTextField component.js:42
    5 Textfield.svelte:166
    run index.mjs:18
    mount_component index.mjs:1415
    flush index.mjs:746
    init index.mjs:1501
    App client.96115843.js:1563
    render app.mjs:424
    fulfilled app.mjs:25
    promise callback*step app.mjs:27
    __awaiter app.mjs:28
    __awaiter app.mjs:24
    render app.mjs:408
    1 app.mjs:403
    fulfilled app.mjs:25
    promise callback*step app.mjs:27
    __awaiter app.mjs:28
    __awaiter app.mjs:24
    handle_target$1 app.mjs:389
    navigate app.mjs:207
    __awaiter app.mjs:28
    __awaiter app.mjs:24
    navigate app.mjs:195
    load_current_page app.mjs:58
    promise callback*load_current_page app.mjs:53
    start$1 app.mjs:357
    <anonymous> client.ts:3
component.js:444:218

I have installed:

{
	"devDependencies": {
		"@smui/textfield": "^2.0.0-beta.0",
	}
}

I also added

warning.code !== "a11y-label-has-associated-control" ||

as shown in #202

how can I use Text fields?

@certara-munderhill
Copy link

@rafalou38 - Think you'll need to do a bind:value={variableName} before the TextField will be visible.

@rafalou38
Copy link
Author

rafalou38 commented Mar 7, 2021

@rafalou38 - Think you'll need to do a bind:value={variableName} before the TextField will be visible.

Thanks it worked!!

@hperrin hperrin self-assigned this Apr 23, 2021
@hperrin hperrin added the duplicate This issue or pull request already exists label Apr 23, 2021
@hperrin
Copy link
Owner

hperrin commented Apr 23, 2021

Duplicate of #143.

@hperrin hperrin closed this as completed Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants