【问题标题】:Is there a way to prevent callback until the input `id` is loaded?有没有办法在输入“id”加载之前防止回调?
【发布时间】:2021-03-13 11:17:41
【问题描述】:

我是 Dash Plotly 的新手。

如果将 Id(在当前时刻)用作其中一个回调的 INPUT,是否有办法防止回调。

A nonexistent object was used in an `Input` of a Dash callback. The id of this object is `some-dropdown` and the property is `value`.

或者有没有办法在dash中注册所有组件id,以后可以用于渲染?

【问题讨论】:

    标签: python-3.x plotly-dash


    【解决方案1】:

    您可以使用pattern matching 回调。这是最灵活的解决方案。如果您要添加已知数量的 ID,那么您还可以在初始化时将所有 ID 包含在应用程序中,并仅在特定触发器发生后使用回调逻辑更新它们。它们最初也可以被隐藏,然后通过更新 style 属性显示出来。

    【讨论】:

      猜你喜欢
      • 2020-10-10
      • 1970-01-01
      • 1970-01-01
      • 2016-10-17
      • 1970-01-01
      • 2021-04-28
      • 1970-01-01
      • 2017-01-17
      • 2019-02-15
      相关资源
      最近更新 更多