Skip to content

Commit

Permalink
bug(notification): Allow for duration to be None and passed to clie…
Browse files Browse the repository at this point in the history
…nt (#1577)
  • Loading branch information
schloerke authored Jul 29, 2024
1 parent 89bab6d commit de17aa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

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

* 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)

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

* `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)
* `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)

* `ui.notification_show(duration=None)` now persists the notification until the app user closes it. (#1577)

### Bug fixes

Expand Down
4 changes: 3 additions & 1 deletion shiny/ui/_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def notification_show(
"type": type,
}

if duration:
if duration is None:
payload.update({"duration": None})
elif duration:
payload.update({"duration": duration * 1000})

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

0 comments on commit de17aa3

Please sign in to comment.