Skip to content

Commit 36e2c28

Browse files
committed
Handle review comment
1 parent 2db7736 commit 36e2c28

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

examples/simple-yjs-widget/notebooks/simple.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
" value = Reactive[int](50)\n",
1616
" min = Reactive[int](0)\n",
1717
" max = Reactive[int](100)\n",
18-
" step = Reactive[int](1)"
18+
" step = Reactive[int](1)\n",
19+
"\n",
20+
" @value.watch\n",
21+
" def _watch_value(self, old, new):\n",
22+
" # Watch the value of the slider, and print the new value change\n",
23+
" #\n",
24+
" # From JupyterLab, show the log console with info level to see the print\n",
25+
" # \"Ctrl + Shift + C\" then type \"Log Console\" to expand that panel\n",
26+
" print(f\"value changed: '{old}'->'{new}'\")"
1927
]
2028
},
2129
{

0 commit comments

Comments
 (0)