Skip to content

demo text input event not work #2169

Description

@wszgrcy

What happened

Image

What you expected

work

Minimal reproduction

https://docs.perryts.com/ui/widgets.html#textfield

// demonstrates: TextField + two-way binding via stateBindTextfield
// docs: docs/src/ui/widgets.md
// platforms: macos, linux, windows
// targets: ios-simulator, web, wasm

import { App, VStack, Text, TextField, State, stateBindTextfield } from "perry/ui"

const text = State("")
const field = TextField("Placeholder...", (value: string) => text.set(value))
stateBindTextfield(text, field) // programmatic text.set() also updates the field

App({
    title: "TextField",
    width: 400,
    height: 200,
    body: VStack(12, [
        field,
        Text(`You typed: ${text.value}`),
    ]),
})

Environment

  • Perry version: 0.5.1025
  • Host OS: windows10
  • Target: native
  • Rust toolchain (if building from source):
  • Installed via: npm/winget

Diagnostic output

no

Anything else

no any log print

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions