【问题标题】:dash button with varying input to url output带有不同输入到 url 输出的破折号按钮
【发布时间】:2020-11-06 19:58:06
【问题描述】:

I have a table in my dashboard which has a lot of different “name” values, I'd like to have button somewhere that when a name is selected and the button is pushed, it will navigate to a URL that contains that姓名。例如:

   name  ID         status
[] mike  a823hjsad  OK
[] sam   9saksndk9  –
[] alex  0274dhskx  OK

[BUTTON]

当我选择了“mike”并按下 [BUTTON] 后,我想打开一个新标签并指向 URL“https://www.google.com/search?q=mike”。但是 URL 的最后一部分会根据选择的名称而改变。

我希望这是有道理的,我对 dash 还是很陌生,似乎有很多不同的方法可以将 html 链接集成到仪表板中。

【问题讨论】:

    标签: python-3.x plotly dashboard plotly-dash


    【解决方案1】:

    使用 Dash 数据表不会太难。具体来说,请参阅 this section of the docs 关于 active_cell 属性。您可以将其用作回调的State 值,并将按钮用作Input。它应该像你描述的那样工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-13
      • 2021-04-07
      • 1970-01-01
      • 1970-01-01
      • 2021-05-01
      相关资源
      最近更新 更多