html - bs_modal 在 flexdashboard 的侧边栏中不起作用
问题描述
bsplus::bs_modal()
创建一个模态对话框弹出窗口,并在列中工作,但不是侧边栏。
关于如何使(1)工作的任何想法?
作为参考,bs_modal()
来源在这里,flexdashboard.js
在这里。
(1) 这有效:
---
title: "Untitled"
output: flexdashboard::flex_dashboard
---
```{r setup, include=FALSE}
library(flexdashboard)
library(shiny)
library(bsplus)
```
Sidebar {.sidebar}
-------------------------------------
```{r}
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
bs_modal(id = "modal", title = "I'm a modal", body = "Yes, I am.")
bs_button("Click for modal") %>%
bs_attach_modal(id_modal = "modal")
```
(2) 这不起作用:
---
title: "Untitled"
output: flexdashboard::flex_dashboard
---
```{r setup, include=FALSE}
library(flexdashboard)
library(shiny)
library(bsplus)
```
Sidebar {.sidebar}
-------------------------------------
```{r}
bs_modal(id = "modal", title = "I'm a modal", body = "Yes, I am.")
bs_button("Click for modal") %>%
bs_attach_modal(id_modal = "modal")
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
```
解决方案
推荐阅读
- c# - NetworkInterface.GetAllNetworkInterfaces() 非常慢
- javascript - 根据 mysql 数据库中的 id 播放音频文件
- html - 当我使用 firebase 部署时,网站的某些部分可以工作,但其他部分不能
- c# - 使用 C# 程序在下载文件之前模拟防病毒检查
- angular - 根据条件更改 mat-autocomplete 选项的值,并过滤这些选项
- apache-spark - spark shuffle write 在小型缓存和操作 df 上爆炸
- python - Matplotlib 中散点图的不同标签
- php - 为什么将集合集合展平为所有数组值的数组?
- python - 错误:命令错误退出状态 1:python setup.py egg_info 检查日志以获取完整命令输出,同时 pip 安装遗传算法
- julia - 如何在 Julia 中制作 inf 矩阵?