Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

0.37.1-a2 #698

Mar 3, 2022 · 1 comments · 3 replies
Discussion options

What's Changed

Full Changelog: 0.37.0...0.37.1-a2


This discussion was created from the release 0.37.1-a2.
You must be logged in to vote

Replies: 1 comment · 3 replies

Comment options

rmorshea
Mar 3, 2022
Maintainer Author

@acivitillo, can you confirm whether or not this addresses the input issue you've been observing?

You must be logged in to vote
3 replies
@acivitillo
Comment options

I can confirm the value setting now works on input element, I need to review further with the team the other issue with select elements not changing in the client between component changes

@acivitillo
Comment options

This works now:

@component
def Input(
    set_value: Callable,
    label: str = "",
    type: str = "text",
    placeholder: str = "Write here the",
    _class: str = class_str,
    value: Any = "",
):

    return html.input(
        {
            "type": type,
            "placeholder": f"{placeholder} {label}",
            "onChange": lambda event: set_value(event["target"]["value"]),
            "class": _class,
            "value": value,
        }
    )
@rmorshea
Comment options

rmorshea Mar 3, 2022
Maintainer Author

The select element is probably the same issue and should be fixed too. input, select, and textarea all support the onChange event and have a value attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.