Skip to content

Commit de17aa3

Browse files
authored
bug(notification): Allow for duration to be None and passed to client (#1577)
1 parent 89bab6d commit de17aa3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Bug fixes
1515

16-
* An empty `input_date()` value no longer crashes Shiny. (#1528)
16+
* An empty `ui.input_date()` value no longer crashes Shiny. (#1528)
1717

1818
* Fixed bug where calling `.update_filter(None)` on a data frame renderer did not visually reset non-numeric column filters. (It did reset the column's filtering, just not the label). Now it resets filter's label. (#1557)
1919

2020
* Require shinyswatch >= 0.7.0 and updated examples accordingly. (#1558)
2121

22-
* `input_text_area(autoresize=True)` now resizes properly even when it's not visible when initially rendered (e.g. in a closed accordion or a hidden tab). (#1560)
22+
* `ui.input_text_area(autoresize=True)` now resizes properly even when it's not visible when initially rendered (e.g. in a closed accordion or a hidden tab). (#1560)
23+
24+
* `ui.notification_show(duration=None)` now persists the notification until the app user closes it. (#1577)
2325

2426
### Bug fixes
2527

shiny/ui/_notification.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def notification_show(
8585
"type": type,
8686
}
8787

88-
if duration:
88+
if duration is None:
89+
payload.update({"duration": None})
90+
elif duration:
8991
payload.update({"duration": duration * 1000})
9092

9193
session._send_message_sync({"notification": {"type": "show", "message": payload}})

0 commit comments

Comments
 (0)