[英]R Shiny - Column in Conditional Panel outside Sidebar Panel
I am editing an existing R Shiny app: link .我正在编辑现有的 R Shiny 应用程序: 链接。 In
ui.R
, after line 48, I wanted to add additional information in the conditionalPanel
.在
ui.R
中,第 48 行之后,我想在conditionalPanel
中添加其他信息。 I have updated the code to look like this:我已将代码更新为如下所示:
conditionalPanel('input.showDendo==1', hr(), h4('Dendrogram Manipulation'), selectInput('dendrogram','Dendrogram Type',choices = c("both", "row", "column", "none"),selected = 'both'), selectizeInput("seriation", "Seriation", c(OLO="OLO",GW="GW",Mean="mean",None="none"),selected = 'OLO'), sliderInput('branches_lwd','Dendrogram Branch Width',value = 0.6,min=0,max=5,step = 0.1) ), hr(), h4("Row Dendrogram"), column( width = 6, selectizeInput("distFun_col", "Distance Method", c(Euclidean = "euclidean", Maximum = "maximum", Manhattan = "manhattan", Canberra = "canberra", Binary = "binary", Minkowski = "minkowski"), selected = "euclidean"))
and I am unable to figure out why the drop down is "outside" the grey background of the sideBarPanel
as seen in the image:而且我无法弄清楚为什么下拉菜单在图像中看到的
sideBarPanel
的灰色背景“外部”:
Due to the styles of this app, you need to set column width to 12 or add another col-sm-6
element, then add <br>
and <hr>
:由于此应用程序的 styles,您需要将列宽设置为 12 或添加另一个
col-sm-6
元素,然后添加<br>
和<hr>
:
hr(),
h4("Row Dendrogram"),
column(
width = 12,
selectizeInput("distFun_col",
"Distance Method",
c(Euclidean = "euclidean",
Maximum = "maximum",
Manhattan = "manhattan",
Canberra = "canberra",
Binary = "binary",
Minkowski = "minkowski"),
selected = "euclidean")),
br(),
hr(),
Then, it should look like this:然后,它应该如下所示:
This happens, because the col-sm-*
classes have float: left;
发生这种情况是因为
col-sm-*
类有float: left;
attribute, which makes them heightless, so they overflow the parent container.属性,这使它们变得不高,因此它们溢出父容器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.