Skip to content

Commit 10e8b59

Browse files
committed
chore: Raise error if submit or focus is True but value not provided
1 parent 9d08442 commit 10e8b59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shiny/ui/_chat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,11 @@ def update_user_input(
956956
Whether to move focus to the input element.
957957
"""
958958

959+
if value is None and (submit or focus):
960+
raise ValueError(
961+
"An input `value` must be provided when `submit` or `focus` are `True`."
962+
)
963+
959964
obj = _utils.drop_none(
960965
{
961966
"value": value,

0 commit comments

Comments
 (0)