I’m trying to avoid the need for a submit button. The below code is currently running from a remote jupyter lab. The message will be printed out only after the cursor focus is removed from the password widget. I would like carriage return to trigger the message printing. Any clues?
from panel.widgets import PasswordInput, TextInput
pn.extension()
def on_enter(event=None):
message_pane.object = "<h2>Password Entered</h2>"
username_input = TextInput(name='Username')
password_input = PasswordInput(name='Password', width=200)
message_pane = pn.pane.HTML('')
layout = pn.Column(username_input, password_input, message_pane)
layout.servable()
In ipywidgets, this can be accomplished with observe.