1.14.0
What's Changed
Update with pip:
pip3 install -U pywa
- [flows] define
Form
init_values
from childreninit_value
- [flows] adding a new
ScreenData
type to be used in screen.data
- [flows] adding
.form_ref
and.form_ref_of(form_name)
to form components - [docs] adding s real-world example for a complex flow
flow = FlowJSON(
screens=[
Screen(
id="WELCOME",
title="Welcome",
terminal=True,
data=[
welcome_header := ScreenData(key="welcome_header", example="Welcome to the demo!"),
initial_name := ScreenData(key="initial_name", example="David"),
],
layout=Layout(
children=[
TextHeading(text=welcome_header.data_key),
Form(
name="form",
children=[
name := TextInput(
name="name",
label="Name",
required=True,
init_value=initial_name.data_key,
),
email := TextInput(
name="email",
label="Email",
input_type=InputType.EMAIL,
required=True,
)
]
),
Footer(
label="Done",
on_click_action=Action(
name=FlowActionType.COMPLETE,
payload={
"name": name.form_ref,
"email": email.form_ref,
}
)
)
]
)
)
]
)
Full Changelog: 1.13.0...1.14.0