Closed cpsievert closed 1 year ago
With this change, if you try to reactive_read() a non-existant or non-trait widget attribute, you'll get an informative error. For example:
reactive_read()
import ipyleaflet as L from htmltools import css from shiny import * from shinywidgets import output_widget, reactive_read, register_widget app_ui = ui.page_fluid( output_widget("map"), ui.output_text("foo"), ) def server(input, output, session): map = L.Map(center=(52, 360), zoom=4) register_widget("map", map) @output @render.text def foo(): reactive_read(map, "foo") app = App(app_ui, server)
Note that this'll also improve a situation like https://github.com/posit-dev/py-shinywidgets/issues/112, where jcharts.selections itself isn't a trait but does inherit from traitlets.HasTraits
jcharts.selections
traitlets.HasTraits
With this change, if you try to
reactive_read()
a non-existant or non-trait widget attribute, you'll get an informative error. For example:Note that this'll also improve a situation like https://github.com/posit-dev/py-shinywidgets/issues/112, where
jcharts.selections
itself isn't a trait but does inherit fromtraitlets.HasTraits