Skip to content

Commit 9bcaa38

Browse files
committed
Explain purpose of model_value
1 parent dfa7fcd commit 9bcaa38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/pydantic_monaco/view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def create_ui(self) -> None:
4646
with VBoxLayout(stretch=True):
4747
# If a component doesn't support the v_model parameter, as with the Monaco editor, then we can
4848
# set the initial value and listen to the events manually.
49+
# Unlike our InputField component, code.Editor doesn't support a v_model. In this case, we can
50+
# use model_value to set the initial value of the component and then listen to the input event
51+
# manually.
4952
code.Editor(
5053
ref="monaco_container",
5154
model_value=("data",),

0 commit comments

Comments
 (0)