R数据表不在带有html标记的列中搜索
在我的闪亮应用程序中,我从DT软件包呈现数据表:R数据表不在带有html标记的列中搜索,html,r,datatables,shiny,dt,Html,R,Datatables,Shiny,Dt,在我的闪亮应用程序中,我从DT软件包呈现数据表: DT::renderDataTable( { datatable( data = DT_frame, selection = 'multiple', class = 'cell-border strip hover', escape = FALSE, #po to, zeby dzialal: <a href=''></a> rownames = TRUE, filter = list(po
DT::renderDataTable( {
datatable(
data = DT_frame,
selection = 'multiple', class = 'cell-border strip hover',
escape = FALSE, #po to, zeby dzialal: <a href=''></a>
rownames = TRUE,
filter = list(position = "top",
clear = F,
plain = T),
extensions = list(
# "FixedHeader" = NULL ,
# 'ColReorder' = NULL ,
'Buttons' = NULL
),
options = list(
scrollX = TRUE,
processing = T,
searchHighlight = TRUE,
search = list(regex = TRUE, caseInsensitive = T),
columnDefs = list(list(targets = cols2hide, visible = FALSE), list(type = 'html', targets = 4) ),
# aoColumnDefs = list(list(sType = "html", aTargets = 4 )),
# fixedHeader = TRUE,
# colReorder = TRUE,
dom = 'Blfrtip',
# dom legend
# p - NEXT/PREVIUS
# i - Showing 1 to 10 of 106 entries
# B - column visibility button
# l - show n entries list
buttons = c('colvis', 'csv')
)
) %>% formatStyle(columns = max_hash2_col_number, backgroundColor = '#CBFFB8') %>%
formatStyle(max_hash2_col_number, cursor = 'pointer') }, server = T )
但它不起作用,数据表搜索整个单元格值。它的工作原理应该与我在搜索字段“44”中输入时一样,DataTable不应该找到:
list(type = 'html', targets = 4)
<div id="44332211">33-ab-v4</div>
33-ab-v4
您好,在您链接的页面中
请注意,如果您使用服务器端处理(serverSide),此选项无效,因为订购和搜索操作由服务器端脚本执行。
太好了!谢谢你的帮助:)这个问题解决了吗?我正在处理同一个问题,也许在被接受的答案发布后的两年内,已经出现了一个解决方案。
<div id="44332211">33-ab-v4</div>