Skip to content

TypeError: _this.input_ is null with Textfield #206

Closed
@rafalou38

Description

@rafalou38

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?

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already exists

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions