Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/js/packages/@reactpy/client/src/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ function UserInputElement({ model }: { model: ReactPyVdom }): JSX.Element {
// allow the client to respond (and possibly change the value)
givenOnChange(event);
};
} else if (!givenOnChange) {
props.onChange = (event: ChangeEvent<any>) => {
// set the value so rerender doesn't stomp on state
setValue(event.target.value);
}
}

// Use createElement here to avoid warning about variable numbers of children not
Expand Down
Loading