Skip to content

Commit d5f58b1

Browse files
committed
Make output_widget compatible with Shiny modules
1 parent a02ef62 commit d5f58b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shinywidgets/_shinywidgets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from shiny.http_staticfiles import StaticFiles
2727
from shiny.render import RenderFunction, RenderFunctionAsync
2828
from shiny.session import get_current_session, require_active_session
29+
from shiny.module import resolve_id
2930

3031
from ._comm import BufferType, ShinyComm, ShinyCommManager
3132
from ._dependencies import (
@@ -39,6 +40,7 @@
3940
def output_widget(
4041
id: str, *, width: Optional[str] = None, height: Optional[str] = None
4142
) -> Tag:
43+
id = resolve_id(id)
4244
return tags.div(
4345
*libembed_dependency(),
4446
output_binding_dependency(),

0 commit comments

Comments
 (0)